Overview
Max Total Supply
244,877,458.275775837179767358 ePMX
Holders
4,642 (0.00%)
Transfers
-
0
Market
Price
$0.00 @ 0.000000 ETH
Onchain Market Cap
-
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
EPMXToken
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// (c) 2023 Primex.finance
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.18;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol";
import "./libraries/Errors.sol";
import {BIG_TIMELOCK_ADMIN} from "./Constants.sol";
import {IEPMXToken} from "./interfaces/IEPMXToken.sol";
contract EPMXToken is IEPMXToken, ERC20, ERC165 {
address public immutable registry;
mapping(address => bool) public whitelist;
/**
* @dev Modifier that checks if the caller has a specific role.
* @param _role The role identifier to check.
*/
modifier onlyRole(bytes32 _role) {
_require(IAccessControl(registry).hasRole(_role, msg.sender), Errors.FORBIDDEN.selector);
_;
}
constructor(address _recipient, address _registry) ERC20("Early Primex Token", "ePMX") {
_require(
ERC165(_registry).supportsInterface(type(IAccessControl).interfaceId),
Errors.ADDRESS_NOT_SUPPORTED.selector
);
registry = _registry;
if (_recipient == address(0)) {
_recipient = msg.sender;
}
_mint(_recipient, 1000000000 * 10 ** decimals());
}
/**
* @inheritdoc IEPMXToken
*/
function burn(uint256 _amount) external override {
_burn(msg.sender, _amount);
emit Burn(msg.sender, _amount);
}
/**
* @inheritdoc IEPMXToken
*/
function addAddressToWhitelist(address _address) public override onlyRole(BIG_TIMELOCK_ADMIN) {
_require(!whitelist[_address], Errors.ADDRESS_ALREADY_WHITELISTED.selector);
whitelist[_address] = true;
emit WhitelistedAddressAdded(_address);
}
/**
* @inheritdoc IEPMXToken
*/
function addAddressesToWhitelist(address[] memory _addresses) public override onlyRole(BIG_TIMELOCK_ADMIN) {
for (uint256 i; i < _addresses.length; i++) {
addAddressToWhitelist(_addresses[i]);
}
}
/**
* @inheritdoc IEPMXToken
*/
function removeAddressFromWhitelist(address _address) public override onlyRole(BIG_TIMELOCK_ADMIN) {
_require(whitelist[_address], Errors.ADDRESS_NOT_WHITELISTED.selector);
whitelist[_address] = false;
emit WhitelistedAddressRemoved(_address);
}
/**
* @inheritdoc IEPMXToken
*/
function removeAddressesFromWhitelist(address[] calldata _addresses) public override onlyRole(BIG_TIMELOCK_ADMIN) {
for (uint256 i; i < _addresses.length; i++) {
removeAddressFromWhitelist(_addresses[i]);
}
}
/**
* @inheritdoc IEPMXToken
*/
function isWhitelisted(address _address) public view override returns (bool) {
return whitelist[_address];
}
/**
* @notice Interface checker
* @param interfaceId The interface id to check
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return
interfaceId == type(IEPMXToken).interfaceId ||
interfaceId == type(IERC20).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev Hook that is called before any token transfer.
* It enforces the restriction that the `from` or `to` address must be on the whitelist,
* or the `from` address must be the zero address for minting.
* @param from The address transferring the tokens. Use the zero address for minting.
* @param to The address receiving the tokens.
*/
function _beforeTokenTransfer(address from, address to, uint256 /* amount */) internal virtual override(ERC20) {
_require(
whitelist[from] || whitelist[to] || from == address(0),
Errors.RECIPIENT_OR_SENDER_MUST_BE_ON_WHITE_LIST.selector
);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @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 {AccessControl-_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 Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @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) external;
/**
* @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) external;
/**
* @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) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)
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.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 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}.
*
* 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 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 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:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, 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}.
*
* NOTE: If `amount` 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 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, 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}.
*
* 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 `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, 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) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, 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) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `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.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, 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:
*
* - `account` 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;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_balances[account] += amount;
}
emit Transfer(address(0), account, amount);
_afterTokenTransfer(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");
unchecked {
_balances[account] = accountBalance - amount;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_totalSupply -= amount;
}
emit Transfer(account, address(0), amount);
_afterTokenTransfer(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 Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - 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 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 {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
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
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the 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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
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) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
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
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
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);
}// (c) 2023 Primex.finance
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.18;
// admin roles
bytes32 constant BIG_TIMELOCK_ADMIN = 0x00; // It's primary admin.
bytes32 constant MEDIUM_TIMELOCK_ADMIN = keccak256("MEDIUM_TIMELOCK_ADMIN");
bytes32 constant SMALL_TIMELOCK_ADMIN = keccak256("SMALL_TIMELOCK_ADMIN");
bytes32 constant EMERGENCY_ADMIN = keccak256("EMERGENCY_ADMIN");
bytes32 constant GUARDIAN_ADMIN = keccak256("GUARDIAN_ADMIN");
bytes32 constant NFT_MINTER = keccak256("NFT_MINTER");
bytes32 constant TRUSTED_TOLERABLE_LIMIT_ROLE = keccak256("TRUSTED_TOLERABLE_LIMIT_ROLE");
// inter-contract interactions roles
bytes32 constant NO_FEE_ROLE = keccak256("NO_FEE_ROLE");
bytes32 constant VAULT_ACCESS_ROLE = keccak256("VAULT_ACCESS_ROLE");
bytes32 constant PM_ROLE = keccak256("PM_ROLE");
bytes32 constant LOM_ROLE = keccak256("LOM_ROLE");
bytes32 constant BATCH_MANAGER_ROLE = keccak256("BATCH_MANAGER_ROLE");
// token constants
address constant NATIVE_CURRENCY = address(uint160(bytes20(keccak256("NATIVE_CURRENCY"))));
address constant USD = 0x0000000000000000000000000000000000000348;
uint256 constant USD_MULTIPLIER = 10 ** (18 - 8); // usd decimals in chainlink is 8
uint8 constant MAX_ASSET_DECIMALS = 18;
// time constants
uint256 constant SECONDS_PER_YEAR = 365 days;
uint256 constant SECONDS_PER_DAY = 1 days;
uint256 constant HOUR = 1 hours;
uint256 constant TEN_WAD = 10 ether;// (c) 2023 Primex.finance
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.18;
interface IEPMXToken {
event WhitelistedAddressAdded(address indexed addr);
event WhitelistedAddressRemoved(address indexed addr);
event Burn(address indexed from, uint256 value);
/**
* @notice Adds the specified address to the whitelist.
* @dev Only callable by the BIG_TIMELOCK_ADMIN role.
* @param _address The address to be added to the whitelist.
*/
function addAddressToWhitelist(address _address) external;
/**
* @notice Adds multiple addresses to the whitelist.
* @dev Only callable by the BIG_TIMELOCK_ADMIN role.
* @param _addresses The array of addresses to be added.
*/
function addAddressesToWhitelist(address[] calldata _addresses) external;
/**
* @notice Removes an address from the whitelist.
* @dev Only callable by the BIG_TIMELOCK_ADMIN role.
* @param _address The address to be removed.
*/
function removeAddressFromWhitelist(address _address) external;
/**
* @notice Removes an address from the whitelist.
* @dev Only callable by the BIG_TIMELOCK_ADMIN role.
* @param _addresses The array of addresses to be removed.
*/
function removeAddressesFromWhitelist(address[] calldata _addresses) external;
/**
* @notice Burns a specific amount of tokens from the caller's balance.
* @param _amount The amount of tokens to be burned.
*
* Requirements:
* The caller must be on the white list.
*/
function burn(uint256 _amount) external;
/**
* @notice Checks if an address is whitelisted.
* @param _address The address to check.
* @return A boolean value indicating whether the address is whitelisted or not.
*/
function isWhitelisted(address _address) external view returns (bool);
}// (c) 2023 Primex.finance
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.18;
// solhint-disable-next-line func-visibility
function _require(bool condition, bytes4 selector) pure {
if (!condition) _revert(selector);
}
// solhint-disable-next-line func-visibility
function _revert(bytes4 selector) pure {
// solhint-disable-next-line no-inline-assembly
assembly ("memory-safe") {
let free_mem_ptr := mload(64)
mstore(free_mem_ptr, selector)
revert(free_mem_ptr, 4)
}
}
library Errors {
event Log(bytes4 error);
//common
error ADDRESS_NOT_SUPPORTED();
error FORBIDDEN();
error AMOUNT_IS_0();
error CALLER_IS_NOT_TRADER();
error CONDITION_INDEX_IS_OUT_OF_BOUNDS();
error INVALID_PERCENT_NUMBER();
error INVALID_SECURITY_BUFFER();
error INVALID_MAINTENANCE_BUFFER();
error TOKEN_ADDRESS_IS_ZERO();
error IDENTICAL_TOKEN_ADDRESSES();
error ASSET_DECIMALS_EXCEEDS_MAX_VALUE();
error CAN_NOT_ADD_WITH_ZERO_ADDRESS();
error SHOULD_BE_DIFFERENT_ASSETS_IN_SPOT();
error TOKEN_NOT_SUPPORTED();
error INSUFFICIENT_DEPOSIT();
error DEPOSIT_IN_THIRD_ASSET_SHARES_ON_DEX_LENGTH_SHOULD_BE_0();
error SHOULD_NOT_HAVE_DUPLICATES();
error DEPOSITED_TO_BORROWED_SHARES_ON_DEX_LENGTH_SHOULD_BE_0();
error DEPOSIT_TO_BORROWED_SHARES_ON_DEX_LENGTH_SHOULD_BE_0();
// error LIMIT_PRICE_IS_ZERO();
error BUCKET_IS_NOT_ACTIVE();
error DIFFERENT_DATA_LENGTH();
error RECIPIENT_OR_SENDER_MUST_BE_ON_WHITE_LIST();
error SLIPPAGE_TOLERANCE_EXCEEDED();
error OPERATION_NOT_SUPPORTED();
error SENDER_IS_BLACKLISTED();
error NATIVE_CURRENCY_CANNOT_BE_ASSET();
error DISABLED_TRANSFER_NATIVE_CURRENCY();
error INVALID_AMOUNT();
// bonus executor
error CALLER_IS_NOT_NFT();
error BONUS_FOR_BUCKET_ALREADY_ACTIVATED();
error WRONG_LENGTH();
error BONUS_DOES_NOT_EXIST();
error CALLER_IS_NOT_DEBT_TOKEN();
error CALLER_IS_NOT_P_TOKEN();
error MAX_BONUS_COUNT_EXCEEDED();
error TIER_IS_NOT_ACTIVE();
error BONUS_PERCENT_IS_ZERO();
// bucket
error INCORRECT_LIQUIDITY_MINING_PARAMS();
error PAIR_PRICE_DROP_IS_NOT_CORRECT();
error ASSET_IS_NOT_SUPPORTED();
error BUCKET_OUTSIDE_PRIMEX_PROTOCOL();
error DEADLINE_IS_PASSED();
error DEADLINE_IS_NOT_PASSED();
error BUCKET_IS_NOT_LAUNCHED();
error BURN_AMOUNT_EXCEEDS_PROTOCOL_DEBT();
error LIQUIDITY_INDEX_OVERFLOW();
error BORROW_INDEX_OVERFLOW();
error BAR_OVERFLOW();
error LAR_OVERFLOW();
error UR_IS_MORE_THAN_1();
error ASSET_ALREADY_SUPPORTED();
error DEPOSIT_IS_MORE_AMOUNT_PER_USER();
error DEPOSIT_EXCEEDS_MAX_TOTAL_DEPOSIT();
error MINING_AMOUNT_WITHDRAW_IS_LOCKED_ON_STABILIZATION_PERIOD();
error WITHDRAW_RATE_IS_MORE_10_PERCENT();
error INVALID_FEE_BUFFER();
error RESERVE_RATE_SHOULD_BE_LESS_THAN_1();
error MAX_TOTAL_DEPOSIT_IS_ZERO();
error AMOUNT_SCALED_SHOULD_BE_GREATER_THAN_ZERO();
error NOT_ENOUGH_LIQUIDITY_IN_THE_BUCKET();
// p/debt token, PMXToken
error BUCKET_IS_IMMUTABLE();
error INVALID_MINT_AMOUNT();
error INVALID_BURN_AMOUNT();
error TRANSFER_NOT_SUPPORTED();
error APPROVE_NOT_SUPPORTED();
error CALLER_IS_NOT_BUCKET();
error CALLER_IS_NOT_A_BUCKET_FACTORY();
error CALLER_IS_NOT_P_TOKEN_RECEIVER();
error DURATION_MUST_BE_MORE_THAN_0();
error INCORRECT_ID();
error THERE_ARE_NO_LOCK_DEPOSITS();
error LOCK_TIME_IS_NOT_EXPIRED();
error TRANSFER_AMOUNT_EXCEED_ALLOWANCE();
error CALLER_IS_NOT_A_MINTER();
error ACTION_ONLY_WITH_AVAILABLE_BALANCE();
error FEE_DECREASER_CALL_FAILED();
error TRADER_REWARD_DISTRIBUTOR_CALL_FAILED();
error INTEREST_INCREASER_CALL_FAILED();
error LENDER_REWARD_DISTRIBUTOR_CALL_FAILED();
error DEPOSIT_DOES_NOT_EXIST();
error RECIPIENT_IS_BLACKLISTED();
//LOM
error ORDER_CAN_NOT_BE_FILLED();
error ORDER_DOES_NOT_EXIST();
error ORDER_IS_NOT_SPOT();
error LEVERAGE_MUST_BE_MORE_THAN_1();
error CANNOT_CHANGE_SPOT_ORDER_TO_MARGIN();
error SHOULD_HAVE_OPEN_CONDITIONS();
error INCORRECT_LEVERAGE();
error INCORRECT_DEADLINE();
error LEVERAGE_SHOULD_BE_1();
error LEVERAGE_EXCEEDS_MAX_LEVERAGE();
error SHOULD_OPEN_POSITION();
error IS_SPOT_ORDER();
error SHOULD_NOT_HAVE_CLOSE_CONDITIONS();
error ORDER_HAS_EXPIRED();
// LiquidityMiningRewardDistributor
error BUCKET_IS_NOT_STABLE();
error ATTEMPT_TO_WITHDRAW_MORE_THAN_DEPOSITED();
error WITHDRAW_PMX_BY_ADMIN_FORBIDDEN();
// nft
error TOKEN_IS_BLOCKED();
error ONLY_MINTERS();
error PROGRAM_IS_NOT_ACTIVE();
error CALLER_IS_NOT_OWNER();
error TOKEN_IS_ALREADY_ACTIVATED();
error WRONG_NETWORK();
error ID_DOES_NOT_EXIST();
error WRONG_URIS_LENGTH();
// PM
error ASSET_ADDRESS_NOT_SUPPORTED();
error IDENTICAL_ASSET_ADDRESSES();
error POSITION_DOES_NOT_EXIST();
error AMOUNT_IS_MORE_THAN_POSITION_AMOUNT();
error BORROWED_AMOUNT_IS_ZERO();
error IS_SPOT_POSITION();
error AMOUNT_IS_MORE_THAN_DEPOSIT();
error DECREASE_AMOUNT_IS_ZERO();
error INSUFFICIENT_DEPOSIT_SIZE();
error IS_NOT_RISKY_OR_CANNOT_BE_CLOSED();
error BUCKET_SHOULD_BE_UNDEFINED();
error DEPOSIT_IN_THIRD_ASSET_ROUTES_LENGTH_SHOULD_BE_0();
error POSITION_CANNOT_BE_CLOSED_FOR_THIS_REASON();
error ADDRESS_IS_ZERO();
error WRONG_TRUSTED_MULTIPLIER();
error POSITION_SIZE_EXCEEDED();
error POSITION_BUCKET_IS_INCORRECT();
error THERE_MUST_BE_AT_LEAST_ONE_POSITION();
error NOTHING_TO_CLOSE();
// BatchManager
error PARAMS_LENGTH_MISMATCH();
error BATCH_CANNOT_BE_CLOSED_FOR_THIS_REASON();
error CLOSE_CONDITION_IS_NOT_CORRECT();
error SOLD_ASSET_IS_INCORRECT();
// Price Oracle
error ZERO_EXCHANGE_RATE();
error NO_PRICEFEED_FOUND();
error NO_PRICE_DROP_FEED_FOUND();
//DNS
error INCORRECT_FEE_RATE();
error BUCKET_ALREADY_FROZEN();
error BUCKET_IS_ALREADY_ADDED();
error DEX_IS_ALREADY_ACTIVATED();
error DEX_IS_ALREADY_FROZEN();
error DEX_IS_ALREADY_ADDED();
error BUCKET_NOT_ADDED();
error DEX_NOT_ACTIVE();
error BUCKET_ALREADY_ACTIVATED();
error DEX_NOT_ADDED();
error BUCKET_IS_INACTIVE();
error WITHDRAWAL_NOT_ALLOWED();
error BUCKET_IS_ALREADY_DEPRECATED();
// Primex upkeep
error NUMBER_IS_0();
//referral program, WhiteBlackList
error CALLER_ALREADY_REGISTERED();
error MISMATCH();
error PARENT_NOT_WHITELISTED();
error ADDRESS_ALREADY_WHITELISTED();
error ADDRESS_ALREADY_BLACKLISTED();
error ADDRESS_NOT_BLACKLISTED();
error ADDRESS_NOT_WHITELISTED();
error ADDRESS_NOT_UNLISTED();
error ADDRESS_IS_WHITELISTED();
error ADDRESS_IS_NOT_CONTRACT();
//Reserve
error BURN_AMOUNT_IS_ZERO();
error CALLER_IS_NOT_EXECUTOR();
error ADDRESS_NOT_PRIMEX_BUCKET();
error NOT_SUFFICIENT_RESERVE_BALANCE();
error INCORRECT_TRANSFER_RESTRICTIONS();
//Vault
error AMOUNT_EXCEEDS_AVAILABLE_BALANCE();
error INSUFFICIENT_FREE_ASSETS();
error CALLER_IS_NOT_SPENDER();
//Pricing Library
error IDENTICAL_ASSETS();
error SUM_OF_SHARES_SHOULD_BE_GREATER_THAN_ZERO();
error DIFFERENT_PRICE_DEX_AND_ORACLE();
error TAKE_PROFIT_IS_LTE_LIMIT_PRICE();
error STOP_LOSS_IS_GTE_LIMIT_PRICE();
error STOP_LOSS_IS_LTE_LIQUIDATION_PRICE();
error INSUFFICIENT_POSITION_SIZE();
error INCORRECT_PATH();
error DEPOSITED_TO_BORROWED_ROUTES_LENGTH_SHOULD_BE_0();
error INCORRECT_CM_TYPE();
// Token transfers
error TOKEN_TRANSFER_IN_FAILED();
error TOKEN_TRANSFER_IN_OVERFLOW();
error TOKEN_TRANSFER_OUT_FAILED();
error NATIVE_TOKEN_TRANSFER_FAILED();
// Conditional Managers
error LOW_PRICE_ROUND_IS_LESS_HIGH_PRICE_ROUND();
error TRAILING_DELTA_IS_INCORRECT();
error DATA_FOR_ROUND_DOES_NOT_EXIST();
error HIGH_PRICE_TIMESTAMP_IS_INCORRECT();
error NO_PRICE_FEED_INTERSECTION();
error SHOULD_BE_CCM();
error SHOULD_BE_COM();
//Lens
error DEPOSITED_AMOUNT_IS_0();
error SPOT_DEPOSITED_ASSET_SHOULD_BE_EQUAL_BORROWED_ASSET();
error ZERO_ASSET_ADDRESS();
error ASSETS_SHOULD_BE_DIFFERENT();
error ZERO_SHARES();
error SHARES_AMOUNT_IS_GREATER_THAN_AMOUNT_TO_SELL();
error NO_ACTIVE_DEXES();
//Bots
error WRONG_BALANCES();
error INVALID_INDEX();
error INVALID_DIVIDER();
error ARRAYS_LENGTHS_IS_NOT_EQUAL();
error DENOMINATOR_IS_0();
//DexAdapter
error ZERO_AMOUNT_IN();
error ZERO_AMOUNT();
error UNKNOWN_DEX_TYPE();
error REVERTED_WITHOUT_A_STRING_TRY_TO_CHECK_THE_ANCILLARY_DATA();
error DELTA_OF_TOKEN_OUT_HAS_POSITIVE_VALUE();
error DELTA_OF_TOKEN_IN_HAS_NEGATIVE_VALUE();
error QUOTER_IS_NOT_PROVIDED();
error DEX_ROUTER_NOT_SUPPORTED();
error QUOTER_NOT_SUPPORTED();
error SWAP_DEADLINE_PASSED();
//SpotTradingRewardDistributor
error PERIOD_DURATION_IS_ZERO();
error REWARD_AMOUNT_IS_ZERO();
error REWARD_PER_PERIOD_IS_NOT_CORRECT();
//ActivityRewardDistributor
error TOTAL_REWARD_AMOUNT_IS_ZERO();
error REWARD_PER_DAY_IS_NOT_CORRECT();
error ZERO_BUCKET_ADDRESS();
//KeeperRewardDistributor
error INCORRECT_PART_IN_REWARD();
//Treasury
error TRANSFER_RESTRICTIONS_NOT_MET();
error INSUFFICIENT_NATIVE_TOKEN_BALANCE();
error INSUFFICIENT_TOKEN_BALANCE();
error EXCEEDED_MAX_AMOUNT_DURING_TIMEFRAME();
error EXCEEDED_MAX_SPENDING_LIMITS();
error SPENDING_LIMITS_ARE_INCORRECT();
error SPENDER_IS_NOT_EXIST();
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"viaIR": true,
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"address","name":"_registry","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":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Burn","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":true,"internalType":"address","name":"addr","type":"address"}],"name":"WhitelistedAddressAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"}],"name":"WhitelistedAddressRemoved","type":"event"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"addAddressToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"addAddressesToWhitelist","outputs":[],"stateMutability":"nonpayable","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":[],"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":[{"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":"_address","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeAddressFromWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"removeAddressesFromWhitelist","outputs":[],"stateMutability":"nonpayable","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":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60a0604090808252346200055c5781816200182d803803809162000024828562000593565b8339810103126200055c576200003a81620005b7565b906200004a6020809201620005b7565b83518391620000598262000561565b601282527122b0b9363c90283934b6b2bc102a37b5b2b760711b84830152855194620000858662000561565b6004808752630caa09ab60e31b868801528351969094906001600160401b03908189116200054757600390815499600197888c811c9c1680156200053c575b8b8d1014620005275781908b601f9d8e8111620004ce575b50508b908d831160011462000467576000926200045b575b505060001982851b1c191690881b1782555b8051928311620004465787548781811c911680156200043b575b8a821014620004265790818b85949311620003ce575b5089908b8411600114620003635760009362000357575b505082871b92600019911b1c19161785555b87516301ffc9a760e01b8152637965db0b60e01b868201526001600160a01b03939087816024818886165afa9081156200034c5760009162000308575b5015620002f857608052821615620002f0575b16938415620002af5750600080526005835260ff8560002054169081156200029a575b811562000291575b501562000283576002546b033b2e3c9fd0803ce8000000918282018092116200026e575060025560008381528083528481208054830190558451918252917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a3516112609081620005cd8239608051818181610198015281816105f7015281816106d8015281816109830152610aa60152f35b601190634e487b7160e01b6000525260246000fd5b8351636a556bdb60e01b8152fd5b905038620001da565b90508360005260ff85600020541690620001d2565b905060649285519262461bcd60e51b845283015260248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152fd5b5033620001af565b885163044aa57560e41b81528690fd5b8881813d831162000344575b62000320818362000593565b810103126200034057519081151582036200033d5750386200019c565b80fd5b5080fd5b503d62000314565b8a513d6000823e3d90fd5b0151915038806200014d565b9190889450601f198416928a6000528b6000209360005b8d828210620003b757505085116200039c575b50505050811b0185556200015f565b01519060f884600019921b161c19169055388080806200038d565b8385015187558c989096019593840193016200037a565b9091925088600052896000208b80860160051c8201928c87106200041c575b918a9187969594930160051c01915b8281106200040c57505062000136565b600081558695508a9101620003fc565b92508192620003ed565b602289634e487b7160e01b6000525260246000fd5b90607f169062000120565b604188634e487b7160e01b6000525260246000fd5b015190503880620000f4565b60008681528d81208c9550929190601f198516908f5b828210620004b657505084116200049d575b505050811b01825562000106565b015160001983871b60f8161c191690553880806200048f565b8385015186558e979095019493840193018f6200047d565b90919250856000528d826000209181860160051c83019386106200051d575b918c91869594930160051c01915b8281106200050d57508d9150620000dc565b600081558594508c9101620004fb565b92508192620004ed565b60228a634e487b7160e01b6000525260246000fd5b9b607f169b620000c4565b604187634e487b7160e01b6000525260246000fd5b600080fd5b604081019081106001600160401b038211176200057d57604052565b634e487b7160e01b600052604160045260246000fd5b601f909101601f19168101906001600160401b038211908210176200057d57604052565b51906001600160a01b03821682036200055c5756fe6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a714610e165750806306fdde0314610d22578063095ea7b314610cf857806318160ddd14610cd957806323b872dd14610c0f57806324953eaa14610a33578063286dd3f51461093e578063313ce5671461092257806339509351146108bb5780633af32abf1461047057806342966c681461073e57806370a08231146107075780637b103999146106c35780637b9417c8146105b257806395d89b41146104ae5780639b19251a14610470578063a457c2d7146103c9578063a9059cbb14610398578063dd62ed3e1461034b5763e2ec6ec3146100ff57600080fd5b3461034757602091826003193601126103435781359167ffffffffffffffff9384841161033f573660238501121561033f578382013594851161032c5760059185831b9484519661015284880189610efc565b87528287016024809783010191368311610328578701905b8282106103055750508451632474521560e21b8082528382018a905233888301526001600160a01b039890977f00000000000000000000000000000000000000000000000000000000000000008a169350909160449086818381885afa9081156102fb578c916102de575b50156102ce578a5b83518110156102ca578a87828a1b86010151168c8a518c815281898201523386820152898186818b5afa9182156102bf5791610292575b50156102825760ff8a8e8381528b8b5220541661027257808d52888852898d20805460ff1916600117905561026d91907fd1bba68c128cc3f427e5831b3c6f99f480b6efa6b9e80c757768f6124158cc3f8e80a2611205565b6101dd565b895163503d101f60e11b81528790fd5b895163036be76f60e61b81528790fd5b6102b29150893d8b116102b8575b6102aa8183610efc565b8101906111ed565b38610214565b503d6102a0565b8c51903d90823e3d90fd5b8b80f35b875163036be76f60e61b81528590fd5b6102f59150873d89116102b8576102aa8183610efc565b386101d5565b89513d8e823e3d90fd5b81356001600160a01b038116810361032457815290840190840161016a565b8a80fd5b8980fd5b634e487b7160e01b865260418252602486fd5b8580fd5b8380fd5b8280fd5b50503461039457806003193601126103945780602092610369610ecb565b610371610ee6565b6001600160a01b0391821683526001865283832091168252845220549051908152f35b5080fd5b5050346103945780600319360112610394576020906103c26103b8610ecb565b6024359033610f34565b5160018152f35b50823461046d578260031936011261046d576103e3610ecb565b918360243592338152600160205281812060018060a01b038616825260205220549082821061041c576020856103c285850387336110eb565b608490602086519162461bcd60e51b8352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152fd5b80fd5b5050346103945760203660031901126103945760209160ff9082906001600160a01b0361049b610ecb565b1681526005855220541690519015158152f35b50919034610394578160031936011261039457805191809380549160019083821c928285169485156105a8575b6020958686108114610595578589529081156105715750600114610519575b610515878761050b828c0383610efc565b5191829182610e82565b0390f35b81529295507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b82841061055e57505050826105159461050b928201019438806104fa565b8054868501880152928601928101610540565b60ff19168887015250505050151560051b830101925061050b8261051538806104fa565b634e487b7160e01b845260228352602484fd5b93607f16936104db565b50903461034757602080600319360112610343576105ce610ecb565b8251632474521560e21b81528481018690523360248201526001600160a01b03919083816044817f000000000000000000000000000000000000000000000000000000000000000087165afa9081156106b957879161069c575b501561068c5716928385526005825260ff838620541661067e5750828452600590528220805460ff191660011790557fd1bba68c128cc3f427e5831b3c6f99f480b6efa6b9e80c757768f6124158cc3f8280a280f35b825163503d101f60e11b8152fd5b5050505163036be76f60e61b8152fd5b6106b39150843d86116102b8576102aa8183610efc565b38610628565b85513d89823e3d90fd5b505034610394578160031936011261039457517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5050346103945760203660031901126103945760209181906001600160a01b0361072f610ecb565b16815280845220549051908152f35b5090346103475760209081600319360112610343578235923315610870573385526005835260ff82862054168015610860575b8015610859575b1561084b5733855284835281852054908482106107fd575090837fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59392338752868452038186205583600254036002558481518581527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef843392a3519283523392a280f35b825162461bcd60e51b8152908101849052602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608490fd5b9051636a556bdb60e01b8152fd5b5084610778565b5084805260ff8286205416610771565b82608492519162461bcd60e51b8352820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152fd5b50913461046d578160031936011261046d576108d5610ecb565b338252600160209081528383206001600160a01b038316845290528282205460243581019290831061090f576020846103c28585336110eb565b634e487b7160e01b815260118552602490fd5b5050346103945781600319360112610394576020905160128152f35b509034610347576020806003193601126103435761095a610ecb565b8251632474521560e21b81528481018690523360248201526001600160a01b03919083816044817f000000000000000000000000000000000000000000000000000000000000000087165afa9081156106b9578791610a16575b501561068c5716928385526005825260ff838620541615610a085750828452600590528220805460ff191690557ff1abf01a1043b7c244d128e8595cf0c1d10743b022b03a02dffd8ca3bf729f5a8280a280f35b82516335876baf60e01b8152fd5b610a2d9150843d86116102b8576102aa8183610efc565b386109b4565b503461034757602091826003193601126103435781359167ffffffffffffffff9384841161033f573660238501121561033f578382013594851161033f5760059160243687851b8701820111610c0b578451632474521560e21b8082528382018a905233828401526001600160a01b03977f000000000000000000000000000000000000000000000000000000000000000089169391926044919087818481895afa908115610c01578d91610be4575b5015610bd4578b5b8b8110610af6578c80f35b83818a1b830101358b8116809103610bd0578d8b51878152818a82015233878201528a8187818c5afa918215610bc55791610ba8575b5015610b985760ff8b8f8381528c8c5220541615610b8857808e528989528a8e20805460ff19169055610b8391907ff1abf01a1043b7c244d128e8595cf0c1d10743b022b03a02dffd8ca3bf729f5a8f80a2611205565b610aeb565b8a516335876baf60e01b81528890fd5b8a5163036be76f60e61b81528890fd5b610bbf91508a3d8c116102b8576102aa8183610efc565b38610b2c565b8d51903d90823e3d90fd5b8d80fd5b885163036be76f60e61b81528690fd5b610bfb9150883d8a116102b8576102aa8183610efc565b38610ae3565b8a513d8f823e3d90fd5b8780fd5b5082903461039457606036600319011261039457610c2b610ecb565b610c33610ee6565b91846044359460018060a01b038416815260016020528181203382526020522054906000198203610c6d575b6020866103c2878787610f34565b848210610c965750918391610c8b602096956103c2950333836110eb565b919394819350610c5f565b606490602087519162461bcd60e51b8352820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152fd5b5050346103945781600319360112610394576020906002549051908152f35b5050346103945780600319360112610394576020906103c2610d18610ecb565b60243590336110eb565b509034610347578260031936011261034757805191836003549060019082821c928281168015610e0c575b6020958686108214610df95750848852908115610dd75750600114610d7e575b610515868661050b828b0383610efc565b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b828410610dc457505050826105159461050b928201019438610d6d565b8054868501880152928601928101610da7565b60ff191687860152505050151560051b830101925061050b8261051538610d6d565b634e487b7160e01b845260229052602483fd5b93607f1693610d4d565b92505034610347576020366003190112610347573563ffffffff60e01b8116809103610347576020925063ede5d28360e01b8114908115610e71575b8115610e60575b5015158152f35b6301ffc9a760e01b14905038610e59565b6336372b0760e01b81149150610e52565b6020808252825181830181905290939260005b828110610eb757505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610e95565b600435906001600160a01b0382168203610ee157565b600080fd5b602435906001600160a01b0382168203610ee157565b90601f8019910116810190811067ffffffffffffffff821117610f1e57604052565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b039081169182156110985716918215611047576000828152600560205260409060ff82822054168015611037575b8015611030575b1561101f578381528060205281812054838110610fcc5791808285602095887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef98965282875203828220558781522082815401905551908152a3565b825162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b8151636a556bdb60e01b8152600490fd5b5080610f70565b5084815260ff8282205416610f69565b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b6001600160a01b0390811691821561119c571691821561114c5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b90816020910312610ee157518015158103610ee15790565b60001981146112145760010190565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220d0ff945555d7678b6cb1525d3c33d88b2b0a6e89c08586348c21a16ca1943a4564736f6c63430008120033000000000000000000000000c110b6e93a51acf1f3ded19c754789e7a2304f070000000000000000000000004197ca290b8c5c2f0932032f1166b49c70e2d941
Deployed Bytecode
0x6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a714610e165750806306fdde0314610d22578063095ea7b314610cf857806318160ddd14610cd957806323b872dd14610c0f57806324953eaa14610a33578063286dd3f51461093e578063313ce5671461092257806339509351146108bb5780633af32abf1461047057806342966c681461073e57806370a08231146107075780637b103999146106c35780637b9417c8146105b257806395d89b41146104ae5780639b19251a14610470578063a457c2d7146103c9578063a9059cbb14610398578063dd62ed3e1461034b5763e2ec6ec3146100ff57600080fd5b3461034757602091826003193601126103435781359167ffffffffffffffff9384841161033f573660238501121561033f578382013594851161032c5760059185831b9484519661015284880189610efc565b87528287016024809783010191368311610328578701905b8282106103055750508451632474521560e21b8082528382018a905233888301526001600160a01b039890977f0000000000000000000000004197ca290b8c5c2f0932032f1166b49c70e2d9418a169350909160449086818381885afa9081156102fb578c916102de575b50156102ce578a5b83518110156102ca578a87828a1b86010151168c8a518c815281898201523386820152898186818b5afa9182156102bf5791610292575b50156102825760ff8a8e8381528b8b5220541661027257808d52888852898d20805460ff1916600117905561026d91907fd1bba68c128cc3f427e5831b3c6f99f480b6efa6b9e80c757768f6124158cc3f8e80a2611205565b6101dd565b895163503d101f60e11b81528790fd5b895163036be76f60e61b81528790fd5b6102b29150893d8b116102b8575b6102aa8183610efc565b8101906111ed565b38610214565b503d6102a0565b8c51903d90823e3d90fd5b8b80f35b875163036be76f60e61b81528590fd5b6102f59150873d89116102b8576102aa8183610efc565b386101d5565b89513d8e823e3d90fd5b81356001600160a01b038116810361032457815290840190840161016a565b8a80fd5b8980fd5b634e487b7160e01b865260418252602486fd5b8580fd5b8380fd5b8280fd5b50503461039457806003193601126103945780602092610369610ecb565b610371610ee6565b6001600160a01b0391821683526001865283832091168252845220549051908152f35b5080fd5b5050346103945780600319360112610394576020906103c26103b8610ecb565b6024359033610f34565b5160018152f35b50823461046d578260031936011261046d576103e3610ecb565b918360243592338152600160205281812060018060a01b038616825260205220549082821061041c576020856103c285850387336110eb565b608490602086519162461bcd60e51b8352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152fd5b80fd5b5050346103945760203660031901126103945760209160ff9082906001600160a01b0361049b610ecb565b1681526005855220541690519015158152f35b50919034610394578160031936011261039457805191809380549160019083821c928285169485156105a8575b6020958686108114610595578589529081156105715750600114610519575b610515878761050b828c0383610efc565b5191829182610e82565b0390f35b81529295507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b82841061055e57505050826105159461050b928201019438806104fa565b8054868501880152928601928101610540565b60ff19168887015250505050151560051b830101925061050b8261051538806104fa565b634e487b7160e01b845260228352602484fd5b93607f16936104db565b50903461034757602080600319360112610343576105ce610ecb565b8251632474521560e21b81528481018690523360248201526001600160a01b03919083816044817f0000000000000000000000004197ca290b8c5c2f0932032f1166b49c70e2d94187165afa9081156106b957879161069c575b501561068c5716928385526005825260ff838620541661067e5750828452600590528220805460ff191660011790557fd1bba68c128cc3f427e5831b3c6f99f480b6efa6b9e80c757768f6124158cc3f8280a280f35b825163503d101f60e11b8152fd5b5050505163036be76f60e61b8152fd5b6106b39150843d86116102b8576102aa8183610efc565b38610628565b85513d89823e3d90fd5b505034610394578160031936011261039457517f0000000000000000000000004197ca290b8c5c2f0932032f1166b49c70e2d9416001600160a01b03168152602090f35b5050346103945760203660031901126103945760209181906001600160a01b0361072f610ecb565b16815280845220549051908152f35b5090346103475760209081600319360112610343578235923315610870573385526005835260ff82862054168015610860575b8015610859575b1561084b5733855284835281852054908482106107fd575090837fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59392338752868452038186205583600254036002558481518581527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef843392a3519283523392a280f35b825162461bcd60e51b8152908101849052602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608490fd5b9051636a556bdb60e01b8152fd5b5084610778565b5084805260ff8286205416610771565b82608492519162461bcd60e51b8352820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152fd5b50913461046d578160031936011261046d576108d5610ecb565b338252600160209081528383206001600160a01b038316845290528282205460243581019290831061090f576020846103c28585336110eb565b634e487b7160e01b815260118552602490fd5b5050346103945781600319360112610394576020905160128152f35b509034610347576020806003193601126103435761095a610ecb565b8251632474521560e21b81528481018690523360248201526001600160a01b03919083816044817f0000000000000000000000004197ca290b8c5c2f0932032f1166b49c70e2d94187165afa9081156106b9578791610a16575b501561068c5716928385526005825260ff838620541615610a085750828452600590528220805460ff191690557ff1abf01a1043b7c244d128e8595cf0c1d10743b022b03a02dffd8ca3bf729f5a8280a280f35b82516335876baf60e01b8152fd5b610a2d9150843d86116102b8576102aa8183610efc565b386109b4565b503461034757602091826003193601126103435781359167ffffffffffffffff9384841161033f573660238501121561033f578382013594851161033f5760059160243687851b8701820111610c0b578451632474521560e21b8082528382018a905233828401526001600160a01b03977f0000000000000000000000004197ca290b8c5c2f0932032f1166b49c70e2d94189169391926044919087818481895afa908115610c01578d91610be4575b5015610bd4578b5b8b8110610af6578c80f35b83818a1b830101358b8116809103610bd0578d8b51878152818a82015233878201528a8187818c5afa918215610bc55791610ba8575b5015610b985760ff8b8f8381528c8c5220541615610b8857808e528989528a8e20805460ff19169055610b8391907ff1abf01a1043b7c244d128e8595cf0c1d10743b022b03a02dffd8ca3bf729f5a8f80a2611205565b610aeb565b8a516335876baf60e01b81528890fd5b8a5163036be76f60e61b81528890fd5b610bbf91508a3d8c116102b8576102aa8183610efc565b38610b2c565b8d51903d90823e3d90fd5b8d80fd5b885163036be76f60e61b81528690fd5b610bfb9150883d8a116102b8576102aa8183610efc565b38610ae3565b8a513d8f823e3d90fd5b8780fd5b5082903461039457606036600319011261039457610c2b610ecb565b610c33610ee6565b91846044359460018060a01b038416815260016020528181203382526020522054906000198203610c6d575b6020866103c2878787610f34565b848210610c965750918391610c8b602096956103c2950333836110eb565b919394819350610c5f565b606490602087519162461bcd60e51b8352820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152fd5b5050346103945781600319360112610394576020906002549051908152f35b5050346103945780600319360112610394576020906103c2610d18610ecb565b60243590336110eb565b509034610347578260031936011261034757805191836003549060019082821c928281168015610e0c575b6020958686108214610df95750848852908115610dd75750600114610d7e575b610515868661050b828b0383610efc565b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b828410610dc457505050826105159461050b928201019438610d6d565b8054868501880152928601928101610da7565b60ff191687860152505050151560051b830101925061050b8261051538610d6d565b634e487b7160e01b845260229052602483fd5b93607f1693610d4d565b92505034610347576020366003190112610347573563ffffffff60e01b8116809103610347576020925063ede5d28360e01b8114908115610e71575b8115610e60575b5015158152f35b6301ffc9a760e01b14905038610e59565b6336372b0760e01b81149150610e52565b6020808252825181830181905290939260005b828110610eb757505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610e95565b600435906001600160a01b0382168203610ee157565b600080fd5b602435906001600160a01b0382168203610ee157565b90601f8019910116810190811067ffffffffffffffff821117610f1e57604052565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b039081169182156110985716918215611047576000828152600560205260409060ff82822054168015611037575b8015611030575b1561101f578381528060205281812054838110610fcc5791808285602095887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef98965282875203828220558781522082815401905551908152a3565b825162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b8151636a556bdb60e01b8152600490fd5b5080610f70565b5084815260ff8282205416610f69565b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b6001600160a01b0390811691821561119c571691821561114c5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b90816020910312610ee157518015158103610ee15790565b60001981146112145760010190565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220d0ff945555d7678b6cb1525d3c33d88b2b0a6e89c08586348c21a16ca1943a4564736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c110b6e93a51acf1f3ded19c754789e7a2304f070000000000000000000000004197ca290b8c5c2f0932032f1166b49c70e2d941
-----Decoded View---------------
Arg [0] : _recipient (address): 0xC110b6e93a51ACF1f3DEd19c754789E7A2304F07
Arg [1] : _registry (address): 0x4197CA290b8c5C2F0932032F1166B49c70e2d941
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c110b6e93a51acf1f3ded19c754789e7a2304f07
Arg [1] : 0000000000000000000000004197ca290b8c5c2f0932032f1166b49c70e2d941
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.
Add Token to MetaMask (Web3)