Overview
S Balance
S Value
$0.00| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 2 internal transactions
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 32590985 | 233 days ago | Contract Creation | 0 S | |||
| 32588517 | 233 days ago | Contract Creation | 0 S |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
PendleDecimalsWrapperFactory
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "./PendleDecimalsWrapper.sol";
import "../libraries/StringLib.sol";
import "../../interfaces/IPDecimalsWrapperFactory.sol";
contract PendleDecimalsWrapperFactory is IPDecimalsWrapperFactory {
mapping(address => mapping(uint8 => address)) public decimalWrappers;
address public immutable dustReceiver;
constructor(address _dustReceiver) {
dustReceiver = _dustReceiver;
}
function getOrCreate(address _rawToken, uint8 _decimals) external returns (address decimalWrapper) {
decimalWrapper = decimalWrappers[_rawToken][_decimals];
if (decimalWrapper == address(0)) {
decimalWrapper = _createDecimalWrapper(_rawToken, _decimals);
}
}
function _createDecimalWrapper(address _rawToken, uint8 _decimals) internal returns (address decimalWrapper) {
assert(_decimals == 18);
string memory name = string(abi.encodePacked(IERC20Metadata(_rawToken).name(), " scaled18"));
string memory symbol = string(abi.encodePacked(IERC20Metadata(_rawToken).symbol(), "-scaled18"));
decimalWrapper = address(new PendleDecimalsWrapper(name, symbol, _rawToken));
decimalWrappers[_rawToken][_decimals] = decimalWrapper;
emit DecimalWrapperCreated(_rawToken, _decimals, decimalWrapper);
}
}// 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/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// 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 (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// 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: GPL-3.0-or-later
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "@openzeppelin/contracts/utils/Context.sol";
/**
* @dev Pendle's ERC20 implementation, modified from @openzeppelin implementation
* Changes are:
* - comes with built-in reentrancy protection, storage-packed with totalSupply variable
* - delete increaseAllowance / decreaseAllowance
* - add nonReentrancy protection to transfer / transferFrom functions
* - allow decimals to be passed in
* - block self-transfer by default
*/
// solhint-disable
contract PendleERC20 is Context, IERC20, IERC20Metadata {
uint8 private constant _NOT_ENTERED = 1;
uint8 private constant _ENTERED = 2;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint248 private _totalSupply;
uint8 private _status;
string private _name;
string private _symbol;
uint8 public immutable decimals;
/**
* @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() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Sets the values for {name}, {symbol} and {decimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_, uint8 decimals_) {
_name = name_;
_symbol = symbol_;
decimals = decimals_;
_status = _NOT_ENTERED;
}
/**
* @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 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) external virtual override nonReentrant 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) external 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
) external virtual override nonReentrant returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* 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");
require(from != to, "ERC20: transfer to self");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
}
_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 += toUint248(amount);
_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;
}
_totalSupply -= toUint248(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 {}
function toUint248(uint256 x) internal virtual returns (uint248) {
require(x <= type(uint248).max); // signed, lim = bit-1
return uint248(x);
}
}/* * @title String & slice utility library for Solidity contracts. * @author Nick Johnson <[email protected]> * * @dev Functionality in this library is largely implemented using an * abstraction called a 'slice'. A slice represents a part of a string - * anything from the entire string to a single character, or even no * characters at all (a 0-length slice). Since a slice only has to specify * an offset and a length, copying and manipulating slices is a lot less * expensive than copying and manipulating the strings they reference. * * To further reduce gas costs, most functions on slice that need to return * a slice modify the original one instead of allocating a new one; for * instance, `s.split(".")` will return the text up to the first '.', * modifying s to only contain the remainder of the string after the '.'. * In situations where you do not want to modify the original slice, you * can make a copy first with `.copy()`, for example: * `s.copy().split(".")`. Try and avoid using this idiom in loops; since * Solidity has no memory management, it will result in allocating many * short-lived slices that are later discarded. * * Functions that return two slices come in two versions: a non-allocating * version that takes the second slice as an argument, modifying it in * place, and an allocating version that allocates and returns the second * slice; see `nextRune` for example. * * Functions that have to copy string data will return strings rather than * slices; these can be cast back to slices for further processing if * required. * * For convenience, some functions are provided with non-modifying * variants that create a new slice and return both; for instance, * `s.splitNew('.')` leaves s unmodified, and returns two values * corresponding to the left and right parts of the string. */ pragma solidity ^0.8.0; library StringLib { struct slice { uint256 _len; uint256 _ptr; } function memcpy(uint256 dest, uint256 src, uint256 len) private pure { // Copy word-length chunks while possible for (; len >= 32; len -= 32) { assembly { mstore(dest, mload(src)) } dest += 32; src += 32; } // Copy remaining bytes uint256 mask = type(uint256).max; if (len > 0) { mask = 256 ** (32 - len) - 1; } assembly { let srcpart := and(mload(src), not(mask)) let destpart := and(mload(dest), mask) mstore(dest, or(destpart, srcpart)) } } /* * @dev Returns a slice containing the entire string. * @param self The string to make a slice from. * @return A newly allocated slice containing the entire string. */ function toSlice(string memory self) internal pure returns (slice memory) { uint256 ptr; assembly { ptr := add(self, 0x20) } return slice(bytes(self).length, ptr); } /* * @dev Returns the length of a null-terminated bytes32 string. * @param self The value to find the length of. * @return The length of the string, from 0 to 32. */ function len(bytes32 self) internal pure returns (uint256) { uint256 ret; if (self == 0) return 0; if (uint256(self) & type(uint128).max == 0) { ret += 16; self = bytes32(uint256(self) / 0x100000000000000000000000000000000); } if (uint256(self) & type(uint64).max == 0) { ret += 8; self = bytes32(uint256(self) / 0x10000000000000000); } if (uint256(self) & type(uint32).max == 0) { ret += 4; self = bytes32(uint256(self) / 0x100000000); } if (uint256(self) & type(uint16).max == 0) { ret += 2; self = bytes32(uint256(self) / 0x10000); } if (uint256(self) & type(uint8).max == 0) { ret += 1; } return 32 - ret; } /* * @dev Returns a slice containing the entire bytes32, interpreted as a * null-terminated utf-8 string. * @param self The bytes32 value to convert to a slice. * @return A new slice containing the value of the input argument up to the * first null. */ function toSliceB32(bytes32 self) internal pure returns (slice memory ret) { // Allocate space for `self` in memory, copy it there, and point ret at it assembly { let ptr := mload(0x40) mstore(0x40, add(ptr, 0x20)) mstore(ptr, self) mstore(add(ret, 0x20), ptr) } ret._len = len(self); } /* * @dev Returns a new slice containing the same data as the current slice. * @param self The slice to copy. * @return A new slice containing the same data as `self`. */ function copy(slice memory self) internal pure returns (slice memory) { return slice(self._len, self._ptr); } /* * @dev Copies a slice to a new string. * @param self The slice to copy. * @return A newly allocated string containing the slice's text. */ function toString(slice memory self) internal pure returns (string memory) { string memory ret = new string(self._len); uint256 retptr; assembly { retptr := add(ret, 32) } memcpy(retptr, self._ptr, self._len); return ret; } /* * @dev Returns the length in runes of the slice. Note that this operation * takes time proportional to the length of the slice; avoid using it * in loops, and call `slice.empty()` if you only need to know whether * the slice is empty or not. * @param self The slice to operate on. * @return The length of the slice in runes. */ function len(slice memory self) internal pure returns (uint256 l) { // Starting at ptr-31 means the LSB will be the byte we care about uint256 ptr = self._ptr - 31; uint256 end = ptr + self._len; for (l = 0; ptr < end; l++) { uint8 b; assembly { b := and(mload(ptr), 0xFF) } if (b < 0x80) { ptr += 1; } else if (b < 0xE0) { ptr += 2; } else if (b < 0xF0) { ptr += 3; } else if (b < 0xF8) { ptr += 4; } else if (b < 0xFC) { ptr += 5; } else { ptr += 6; } } } /* * @dev Returns true if the slice is empty (has a length of 0). * @param self The slice to operate on. * @return True if the slice is empty, False otherwise. */ function empty(slice memory self) internal pure returns (bool) { return self._len == 0; } /* * @dev Returns a positive number if `other` comes lexicographically after * `self`, a negative number if it comes before, or zero if the * contents of the two slices are equal. Comparison is done per-rune, * on unicode codepoints. * @param self The first slice to compare. * @param other The second slice to compare. * @return The result of the comparison. */ function compare(slice memory self, slice memory other) internal pure returns (int256) { uint256 shortest = self._len; if (other._len < self._len) shortest = other._len; uint256 selfptr = self._ptr; uint256 otherptr = other._ptr; for (uint256 idx = 0; idx < shortest; idx += 32) { uint256 a; uint256 b; assembly { a := mload(selfptr) b := mload(otherptr) } if (a != b) { // Mask out irrelevant bytes and check again uint256 mask = type(uint256).max; // 0xffff... if (shortest < 32) { mask = ~(2 ** (8 * (32 - shortest + idx)) - 1); } unchecked { uint256 diff = (a & mask) - (b & mask); if (diff != 0) return int256(diff); } } selfptr += 32; otherptr += 32; } return int256(self._len) - int256(other._len); } /* * @dev Returns true if the two slices contain the same text. * @param self The first slice to compare. * @param self The second slice to compare. * @return True if the slices are equal, false otherwise. */ function equals(slice memory self, slice memory other) internal pure returns (bool) { return compare(self, other) == 0; } /* * @dev Extracts the first rune in the slice into `rune`, advancing the * slice to point to the next rune and returning `self`. * @param self The slice to operate on. * @param rune The slice that will contain the first rune. * @return `rune`. */ function nextRune(slice memory self, slice memory rune) internal pure returns (slice memory) { rune._ptr = self._ptr; if (self._len == 0) { rune._len = 0; return rune; } uint256 l; uint256 b; // Load the first byte of the rune into the LSBs of b assembly { b := and(mload(sub(mload(add(self, 32)), 31)), 0xFF) } if (b < 0x80) { l = 1; } else if (b < 0xE0) { l = 2; } else if (b < 0xF0) { l = 3; } else { l = 4; } // Check for truncated codepoints if (l > self._len) { rune._len = self._len; self._ptr += self._len; self._len = 0; return rune; } self._ptr += l; self._len -= l; rune._len = l; return rune; } /* * @dev Returns the first rune in the slice, advancing the slice to point * to the next rune. * @param self The slice to operate on. * @return A slice containing only the first rune from `self`. */ function nextRune(slice memory self) internal pure returns (slice memory ret) { nextRune(self, ret); } /* * @dev Returns the number of the first codepoint in the slice. * @param self The slice to operate on. * @return The number of the first codepoint in the slice. */ function ord(slice memory self) internal pure returns (uint256 ret) { if (self._len == 0) { return 0; } uint256 word; uint256 length; uint256 divisor = 2 ** 248; // Load the rune into the MSBs of b assembly { word := mload(mload(add(self, 32))) } uint256 b = word / divisor; if (b < 0x80) { ret = b; length = 1; } else if (b < 0xE0) { ret = b & 0x1F; length = 2; } else if (b < 0xF0) { ret = b & 0x0F; length = 3; } else { ret = b & 0x07; length = 4; } // Check for truncated codepoints if (length > self._len) { return 0; } for (uint256 i = 1; i < length; i++) { divisor = divisor / 256; b = (word / divisor) & 0xFF; if (b & 0xC0 != 0x80) { // Invalid UTF-8 sequence return 0; } ret = (ret * 64) | (b & 0x3F); } return ret; } /* * @dev Returns the keccak-256 hash of the slice. * @param self The slice to hash. * @return The hash of the slice. */ function keccak(slice memory self) internal pure returns (bytes32 ret) { assembly { ret := keccak256(mload(add(self, 32)), mload(self)) } } /* * @dev Returns true if `self` starts with `needle`. * @param self The slice to operate on. * @param needle The slice to search for. * @return True if the slice starts with the provided text, false otherwise. */ function startsWith(slice memory self, slice memory needle) internal pure returns (bool) { if (self._len < needle._len) { return false; } if (self._ptr == needle._ptr) { return true; } bool equal; assembly { let length := mload(needle) let selfptr := mload(add(self, 0x20)) let needleptr := mload(add(needle, 0x20)) equal := eq(keccak256(selfptr, length), keccak256(needleptr, length)) } return equal; } /* * @dev If `self` starts with `needle`, `needle` is removed from the * beginning of `self`. Otherwise, `self` is unmodified. * @param self The slice to operate on. * @param needle The slice to search for. * @return `self` */ function beyond(slice memory self, slice memory needle) internal pure returns (slice memory) { if (self._len < needle._len) { return self; } bool equal = true; if (self._ptr != needle._ptr) { assembly { let length := mload(needle) let selfptr := mload(add(self, 0x20)) let needleptr := mload(add(needle, 0x20)) equal := eq(keccak256(selfptr, length), keccak256(needleptr, length)) } } if (equal) { self._len -= needle._len; self._ptr += needle._len; } return self; } /* * @dev Returns true if the slice ends with `needle`. * @param self The slice to operate on. * @param needle The slice to search for. * @return True if the slice starts with the provided text, false otherwise. */ function endsWith(slice memory self, slice memory needle) internal pure returns (bool) { if (self._len < needle._len) { return false; } uint256 selfptr = self._ptr + self._len - needle._len; if (selfptr == needle._ptr) { return true; } bool equal; assembly { let length := mload(needle) let needleptr := mload(add(needle, 0x20)) equal := eq(keccak256(selfptr, length), keccak256(needleptr, length)) } return equal; } /* * @dev If `self` ends with `needle`, `needle` is removed from the * end of `self`. Otherwise, `self` is unmodified. * @param self The slice to operate on. * @param needle The slice to search for. * @return `self` */ function until(slice memory self, slice memory needle) internal pure returns (slice memory) { if (self._len < needle._len) { return self; } uint256 selfptr = self._ptr + self._len - needle._len; bool equal = true; if (selfptr != needle._ptr) { assembly { let length := mload(needle) let needleptr := mload(add(needle, 0x20)) equal := eq(keccak256(selfptr, length), keccak256(needleptr, length)) } } if (equal) { self._len -= needle._len; } return self; } // Returns the memory address of the first byte of the first occurrence of // `needle` in `self`, or the first byte after `self` if not found. function findPtr( uint256 selflen, uint256 selfptr, uint256 needlelen, uint256 needleptr ) private pure returns (uint256) { uint256 ptr = selfptr; uint256 idx; if (needlelen <= selflen) { if (needlelen <= 32) { bytes32 mask; if (needlelen > 0) { mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1)); } bytes32 needledata; assembly { needledata := and(mload(needleptr), mask) } uint256 end = selfptr + selflen - needlelen; bytes32 ptrdata; assembly { ptrdata := and(mload(ptr), mask) } while (ptrdata != needledata) { if (ptr >= end) return selfptr + selflen; ptr++; assembly { ptrdata := and(mload(ptr), mask) } } return ptr; } else { // For long needles, use hashing bytes32 hash; assembly { hash := keccak256(needleptr, needlelen) } for (idx = 0; idx <= selflen - needlelen; idx++) { bytes32 testHash; assembly { testHash := keccak256(ptr, needlelen) } if (hash == testHash) return ptr; ptr += 1; } } } return selfptr + selflen; } // Returns the memory address of the first byte after the last occurrence of // `needle` in `self`, or the address of `self` if not found. function rfindPtr( uint256 selflen, uint256 selfptr, uint256 needlelen, uint256 needleptr ) private pure returns (uint256) { uint256 ptr; if (needlelen <= selflen) { if (needlelen <= 32) { bytes32 mask; if (needlelen > 0) { mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1)); } bytes32 needledata; assembly { needledata := and(mload(needleptr), mask) } ptr = selfptr + selflen - needlelen; bytes32 ptrdata; assembly { ptrdata := and(mload(ptr), mask) } while (ptrdata != needledata) { if (ptr <= selfptr) return selfptr; ptr--; assembly { ptrdata := and(mload(ptr), mask) } } return ptr + needlelen; } else { // For long needles, use hashing bytes32 hash; assembly { hash := keccak256(needleptr, needlelen) } ptr = selfptr + (selflen - needlelen); while (ptr >= selfptr) { bytes32 testHash; assembly { testHash := keccak256(ptr, needlelen) } if (hash == testHash) return ptr + needlelen; ptr -= 1; } } } return selfptr; } /* * @dev Modifies `self` to contain everything from the first occurrence of * `needle` to the end of the slice. `self` is set to the empty slice * if `needle` is not found. * @param self The slice to search and modify. * @param needle The text to search for. * @return `self`. */ function find(slice memory self, slice memory needle) internal pure returns (slice memory) { uint256 ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr); self._len -= ptr - self._ptr; self._ptr = ptr; return self; } /* * @dev Modifies `self` to contain the part of the string from the start of * `self` to the end of the first occurrence of `needle`. If `needle` * is not found, `self` is set to the empty slice. * @param self The slice to search and modify. * @param needle The text to search for. * @return `self`. */ function rfind(slice memory self, slice memory needle) internal pure returns (slice memory) { uint256 ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr); self._len = ptr - self._ptr; return self; } /* * @dev Splits the slice, setting `self` to everything after the first * occurrence of `needle`, and `token` to everything before it. If * `needle` does not occur in `self`, `self` is set to the empty slice, * and `token` is set to the entirety of `self`. * @param self The slice to split. * @param needle The text to search for in `self`. * @param token An output parameter to which the first token is written. * @return `token`. */ function split(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) { uint256 ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr); token._ptr = self._ptr; token._len = ptr - self._ptr; if (ptr == self._ptr + self._len) { // Not found self._len = 0; } else { self._len -= token._len + needle._len; self._ptr = ptr + needle._len; } return token; } /* * @dev Splits the slice, setting `self` to everything after the first * occurrence of `needle`, and returning everything before it. If * `needle` does not occur in `self`, `self` is set to the empty slice, * and the entirety of `self` is returned. * @param self The slice to split. * @param needle The text to search for in `self`. * @return The part of `self` up to the first occurrence of `delim`. */ function split(slice memory self, slice memory needle) internal pure returns (slice memory token) { split(self, needle, token); } /* * @dev Splits the slice, setting `self` to everything before the last * occurrence of `needle`, and `token` to everything after it. If * `needle` does not occur in `self`, `self` is set to the empty slice, * and `token` is set to the entirety of `self`. * @param self The slice to split. * @param needle The text to search for in `self`. * @param token An output parameter to which the first token is written. * @return `token`. */ function rsplit(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) { uint256 ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr); token._ptr = ptr; token._len = self._len - (ptr - self._ptr); if (ptr == self._ptr) { // Not found self._len = 0; } else { self._len -= token._len + needle._len; } return token; } /* * @dev Splits the slice, setting `self` to everything before the last * occurrence of `needle`, and returning everything after it. If * `needle` does not occur in `self`, `self` is set to the empty slice, * and the entirety of `self` is returned. * @param self The slice to split. * @param needle The text to search for in `self`. * @return The part of `self` after the last occurrence of `delim`. */ function rsplit(slice memory self, slice memory needle) internal pure returns (slice memory token) { rsplit(self, needle, token); } /* * @dev Counts the number of nonoverlapping occurrences of `needle` in `self`. * @param self The slice to search. * @param needle The text to search for in `self`. * @return The number of occurrences of `needle` found in `self`. */ function count(slice memory self, slice memory needle) internal pure returns (uint256 cnt) { uint256 ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr) + needle._len; while (ptr <= self._ptr + self._len) { cnt++; ptr = findPtr(self._len - (ptr - self._ptr), ptr, needle._len, needle._ptr) + needle._len; } } /* * @dev Returns True if `self` contains `needle`. * @param self The slice to search. * @param needle The text to search for in `self`. * @return True if `needle` is found in `self`, false otherwise. */ function contains(slice memory self, slice memory needle) internal pure returns (bool) { return rfindPtr(self._len, self._ptr, needle._len, needle._ptr) != self._ptr; } /* * @dev Returns a newly allocated string containing the concatenation of * `self` and `other`. * @param self The first slice to concatenate. * @param other The second slice to concatenate. * @return The concatenation of the two strings. */ function concat(slice memory self, slice memory other) internal pure returns (string memory) { string memory ret = new string(self._len + other._len); uint256 retptr; assembly { retptr := add(ret, 32) } memcpy(retptr, self._ptr, self._len); memcpy(retptr + self._len, other._ptr, other._len); return ret; } /* * @dev Joins an array of slices, using `self` as a delimiter, returning a * newly allocated string. * @param self The delimiter to use. * @param parts A list of slices to join. * @return A newly allocated string containing all the slices in `parts`, * joined with `self`. */ function join(slice memory self, slice[] memory parts) internal pure returns (string memory) { if (parts.length == 0) return ""; uint256 length = self._len * (parts.length - 1); for (uint256 i = 0; i < parts.length; i++) length += parts[i]._len; string memory ret = new string(length); uint256 retptr; assembly { retptr := add(ret, 32) } for (uint256 i = 0; i < parts.length; i++) { memcpy(retptr, parts[i]._ptr, parts[i]._len); retptr += parts[i]._len; if (i < parts.length - 1) { memcpy(retptr, self._ptr, self._len); retptr += self._len; } } return ret; } }
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "../../interfaces/IWETH.sol";
abstract contract TokenHelper {
using SafeERC20 for IERC20;
address internal constant NATIVE = address(0);
uint256 internal constant LOWER_BOUND_APPROVAL = type(uint96).max / 2; // some tokens use 96 bits for approval
function _transferIn(address token, address from, uint256 amount) internal {
if (token == NATIVE) require(msg.value == amount, "eth mismatch");
else if (amount != 0) IERC20(token).safeTransferFrom(from, address(this), amount);
}
function _transferFrom(IERC20 token, address from, address to, uint256 amount) internal {
if (amount != 0) token.safeTransferFrom(from, to, amount);
}
function _transferOut(address token, address to, uint256 amount) internal {
if (amount == 0) return;
if (token == NATIVE) {
(bool success, ) = to.call{value: amount}("");
require(success, "eth send failed");
} else {
IERC20(token).safeTransfer(to, amount);
}
}
function _transferOut(address[] memory tokens, address to, uint256[] memory amounts) internal {
uint256 numTokens = tokens.length;
require(numTokens == amounts.length, "length mismatch");
for (uint256 i = 0; i < numTokens; ) {
_transferOut(tokens[i], to, amounts[i]);
unchecked {
i++;
}
}
}
function _selfBalance(address token) internal view returns (uint256) {
return (token == NATIVE) ? address(this).balance : IERC20(token).balanceOf(address(this));
}
function _selfBalance(IERC20 token) internal view returns (uint256) {
return token.balanceOf(address(this));
}
/// @notice Approves the stipulated contract to spend the given allowance in the given token
/// @dev PLS PAY ATTENTION to tokens that requires the approval to be set to 0 before changing it
function _safeApprove(address token, address to, uint256 value) internal {
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value));
require(success && (data.length == 0 || abi.decode(data, (bool))), "Safe Approve");
}
function _safeApproveInf(address token, address to) internal {
if (token == NATIVE) return;
if (IERC20(token).allowance(address(this), to) < LOWER_BOUND_APPROVAL) {
_safeApprove(token, to, 0);
_safeApprove(token, to, type(uint256).max);
}
}
function _wrap_unwrap_ETH(address tokenIn, address tokenOut, uint256 netTokenIn) internal {
if (tokenIn == NATIVE) IWETH(tokenOut).deposit{value: netTokenIn}();
else IWETH(tokenIn).withdraw(netTokenIn);
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
import "../erc20/PendleERC20.sol";
import "../../interfaces/IPDecimalsWrapper.sol";
import "../../interfaces/IPDecimalsWrapperFactory.sol";
import "../libraries/TokenHelper.sol";
contract PendleDecimalsWrapper is PendleERC20, TokenHelper, IPDecimalsWrapper {
address public immutable factory;
address public immutable rawToken;
uint8 public immutable rawDecimals;
constructor(string memory name_, string memory symbol_, address rawToken_) PendleERC20(name_, symbol_, 18) {
rawToken = rawToken_;
factory = msg.sender;
rawDecimals = IERC20Metadata(rawToken).decimals();
assert(rawDecimals <= 18);
}
function wrap(uint256 amount) external returns (uint256 amountOut) {
_transferIn(rawToken, msg.sender, amount);
amountOut = rawToWrapped(amount);
_mint(msg.sender, amountOut);
}
function unwrap(uint256 amount) external returns (uint256 amountOut) {
_burn(msg.sender, amount);
amountOut = wrappedToRaw(amount);
_transferOut(rawToken, msg.sender, amountOut);
}
function rawToWrapped(uint256 amount) public view returns (uint256) {
return amount * (10 ** (18 - rawDecimals));
}
function wrappedToRaw(uint256 amount) public view returns (uint256) {
return amount / (10 ** (18 - rawDecimals));
}
function sweep() external {
uint256 balance = _selfBalance(rawToken) - wrappedToRaw(totalSupply());
if (balance > 0) {
_transferOut(rawToken, IPDecimalsWrapperFactory(factory).dustReceiver(), balance);
}
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
interface IPDecimalsWrapper is IERC20Metadata {
function wrap(uint256 amount) external returns (uint256 amountOut);
function unwrap(uint256 amount) external returns (uint256 amountOut);
function rawToken() external view returns (address);
function rawDecimals() external view returns (uint8);
function rawToWrapped(uint256 amount) external view returns (uint256);
function wrappedToRaw(uint256 amount) external view returns (uint256);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
interface IPDecimalsWrapperFactory {
event DecimalWrapperCreated(address indexed rawToken, uint8 indexed decimals, address indexed decimalsWrapper);
function getOrCreate(address _rawToken, uint8 _decimals) external returns (address decimalsWrapper);
function dustReceiver() external view returns (address);
}// SPDX-License-Identifier: GPL-3.0-or-later
/*
* MIT License
* ===========
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IWETH is IERC20 {
event Deposit(address indexed dst, uint256 wad);
event Withdrawal(address indexed src, uint256 wad);
function deposit() external payable;
function withdraw(uint256 wad) external;
}{
"optimizer": {
"enabled": true,
"runs": 1000000
},
"viaIR": true,
"evmVersion": "shanghai",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_dustReceiver","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rawToken","type":"address"},{"indexed":true,"internalType":"uint8","name":"decimals","type":"uint8"},{"indexed":true,"internalType":"address","name":"decimalsWrapper","type":"address"}],"name":"DecimalWrapperCreated","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint8","name":"","type":"uint8"}],"name":"decimalWrappers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dustReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rawToken","type":"address"},{"internalType":"uint8","name":"_decimals","type":"uint8"}],"name":"getOrCreate","outputs":[{"internalType":"address","name":"decimalWrapper","type":"address"}],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60a03461006a57601f61269038819003918201601f19168301916001600160401b0383118484101761006e5780849260209460405283398101031261006a57516001600160a01b038116810361006a5760805260405161260d90816100838239608051816103ee0152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080604090808252600436101562000015575f80fd5b5f3560e01c90816341fa541614620003a45750806362b9b179146200035b5763975d8cc31462000043575f80fd5b346200035757620000543662000412565b919073ffffffffffffffffffffffffffffffffffffffff80911691825f526020935f855260ff825f20911690815f52855282825f2054169384156200009d575b50505191168152f35b90919350601282036200032a5783517f06fdde030000000000000000000000000000000000000000000000000000000081525f81600481855afa90811562000320575f9162000302575b506200013c60298651836200010682955180928c8086019101620004b2565b81017f207363616c6564313800000000000000000000000000000000000000000000008a82015203600981018452018262000470565b8451907f95d89b410000000000000000000000000000000000000000000000000000000082525f82600481865afa918215620002f8575f92620002cf575b50620001cf60298751846200019982965180928d8086019101620004b2565b81017f2d7363616c6564313800000000000000000000000000000000000000000000008b82015203600981018552018362000470565b85519161202a908184019184831067ffffffffffffffff841117620002a2576200021f86926200021187968c94620005ae893960608752606087019062000568565b908582038d87015262000568565b92015203905ff0801562000298578316918183925f525f8752855f20825f528752855f20837fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790557f253d1f0c6a570b2bcd82e95c7259022a432e806a0b38e893d99e1c8a2accde425f80a4915f8062000094565b84513d5f823e3d90fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620002f09192503d805f833e620002e7818362000470565b810190620004d5565b905f6200017a565b86513d5f823e3d90fd5b6200031991503d805f833e620002e7818362000470565b5f620000e7565b85513d5f823e3d90fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52600160045260245ffd5b5f80fd5b50346200035757602090620003703662000412565b73ffffffffffffffffffffffffffffffffffffffff8092165f525f845260ff835f2091165f528352815f2054169051908152f35b3462000357575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620003575760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6040910112620003575760043573ffffffffffffffffffffffffffffffffffffffff8116810362000357579060243560ff81168103620003575790565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117620002a257604052565b5f5b838110620004c45750505f910152565b8181015183820152602001620004b4565b6020818303126200035757805167ffffffffffffffff918282116200035757019082601f8301121562000357578151908111620002a257604051926200054460207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f850116018562000470565b818452602082840101116200035757620005659160208085019101620004b2565b90565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093620005a681518092818752878088019101620004b2565b011601019056fe61010080604052346200025c576200202a80380380916200002182856200045e565b83398101906060818303126200025c5780516001600160401b0392908381116200025c57816200005391840162000482565b92602091828401518281116200025c576040916200007391860162000482565b9301516001600160a01b038116918282036200025c57855181811162000369576003908154906001988983811c9316801562000453575b888410146200043f578190601f93848111620003ec575b50889084831160011462000389575f926200037d575b50505f1982851b1c191690891b1782555b8651928311620003695760049687548981811c911680156200035e575b888210146200034b57918795939183828b99979511620002e9575b50869184116001146200027f575f9291908462000273575b5050828a1b925f19911b1c19161784555b6012608052600280546001600160f81b0316600160f81b17905560c0523360a05260405163313ce56760e01b815292839182905afa91821562000268575f9262000223575b505060ff8160129260e05216116200021357604051611b339081620004f7823960805181610d3d015260a0518181816106de0152610bcc015260c05181818161010b015281816104f10152818161074c0152610b0f015260e051818181610158015281816104bf01528181610a3b01528181610aa401528181610b6901526111630152f35b634e487b7160e01b5f525260245ffd5b90809250813d831162000260575b6200023d81836200045e565b810103126200025c575160ff811681036200025c5760ff60126200018e565b5f80fd5b503d62000231565b6040513d5f823e3d90fd5b015191505f8062000138565b90918a9392601f19841692895f52885f20935f5b818110620002cd57508511620002b3575b50505050811b01845562000149565b01519060f8845f19921b161c191690555f808080620002a4565b8284015186558d9b508c9a8f9890960195938401930162000293565b9193959790929496505f52875f208380870160051c8201928a881062000341575b8a989694928c9a98968e929593950160051c01915b8281106200032f57505062000120565b5f81558c9a508b99508d91016200031f565b925081926200030a565b602289634e487b7160e01b5f525260245ffd5b90607f169062000105565b634e487b7160e01b5f52604160045260245ffd5b015190505f80620000d7565b908b9350601f19831691865f528a5f20925f5b8c828210620003d55750508411620003bd575b505050811b018255620000e8565b01515f1983871b60f8161c191690555f8080620003af565b8385015186558f979095019493840193016200039c565b909150845f52885f208480850160051c8201928b861062000435575b918d91869594930160051c01915b82811062000426575050620000c1565b5f81558594508d910162000416565b9250819262000408565b634e487b7160e01b5f52602260045260245ffd5b92607f1692620000aa565b601f909101601f19168101906001600160401b038211908210176200036957604052565b919080601f840112156200025c5782516001600160401b038111620003695760209060405192620004bd83601f19601f85011601856200045e565b8184528282870101116200025c575f5b818110620004e25750825f9394955001015290565b8581018301518482018401528201620004cd56fe604060808152600480361015610013575f80fd5b5f3560e01c8063054be8021461112457806306fdde0314610fda578063095ea7b314610f8c57806318160ddd14610f2f57806323b872dd14610d61578063313ce56714610d0657806335faa41614610ac85780633b97423f14610a6d57806345a67b86146109fc57806370a082311461099b57806395d89b4114610843578063a9059cbb14610770578063aef79a4f14610702578063c45a015514610694578063dd62ed3e1461061f578063de0e9a3e146103c85763ea598cb0146100d6575f80fd5b3461026657602091827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102665781357f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16806103215750806102c557610187905b61018161017c7f0000000000000000000000000000000000000000000000000000000000000000611238565b611276565b90611391565b91331561026a577effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8084116102665760025491818516828416019082821161023a5750907fff000000000000000000000000000000000000000000000000000000000000009116911617600255335f525f8352805f20610207838254611515565b905580518281525f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef853393a351908152f35b6011907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b5f80fd5b8360649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152fd5b509160649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152600c60248201527f657468206d69736d6174636800000000000000000000000000000000000000006044820152fd5b81610331575b5061018790610150565b8251907f23b872dd00000000000000000000000000000000000000000000000000000000868301523360248301523060448301528260648301526064825260a0820182811067ffffffffffffffff82111761039c5784526101879291610396916118fc565b90610327565b6041867f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b50903461026657602091827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026657803590331561059d57335f525f8452825f205482811061051b578290335f525f865203835f20557effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8083116102665760025491818416828416039082821161023a57506104e99392917fff0000000000000000000000000000000000000000000000000000000000000091169116176002555f83518281527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef863392a36104e361017c7f0000000000000000000000000000000000000000000000000000000000000000611238565b90611287565b9061051582337f00000000000000000000000000000000000000000000000000000000000000006117f9565b51908152f35b608482868651917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152fd5b608490848451917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152fd5b823461026657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266576020906106596111f2565b610661611215565b9073ffffffffffffffffffffffffffffffffffffffff8091165f5260018452825f2091165f528252805f20549051908152f35b8234610266575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b8234610266575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461026657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266576020907f01000000000000000000000000000000000000000000000000000000000000006107cb6111f2565b610834600254916107e260028460f81c141561132c565b7f02000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff809416176002556024359033611522565b60025416176002555160018152f35b509034610266575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266578051905f9280549060018260011c9160018416938415610991575b60209485851081146109655784885290811561092557506001146108cc575b6108c886866108be828b03836112be565b519182918261118e565b0390f35b5f9081529295507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b82841061091257505050826108c8946108be92820101945f6108ad565b80548685018801529286019281016108f5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001687860152505050151560051b83010192506108be826108c85f6108ad565b6022837f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b92607f169261088e565b82346102665760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102665760209073ffffffffffffffffffffffffffffffffffffffff6109eb6111f2565b165f525f8252805f20549051908152f35b5090346102665760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026657610a66602092610a5f61017c7f0000000000000000000000000000000000000000000000000000000000000000611238565b9035611391565b9051908152f35b8234610266575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266576020905160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5034610266575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102665773ffffffffffffffffffffffffffffffffffffffff917f000000000000000000000000000000000000000000000000000000000000000083811680610c80575047925b610b8d7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600254166104e361017c7f0000000000000000000000000000000000000000000000000000000000000000611238565b80850394808611610c545703610b9f57005b6020835180927f41fa541600000000000000000000000000000000000000000000000000000000825281887f0000000000000000000000000000000000000000000000000000000000000000165afa928315610c4b57505f92610c0a575b50610c0893506117f9565b005b9091506020813d602011610c43575b81610c26602093836112be565b810103126102665751928316830361026657610c0892905f610bfd565b3d9150610c19565b513d5f823e3d90fd5b6011837f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b60206024918451928380927f70a0823100000000000000000000000000000000000000000000000000000000825230898301525afa908115610cfc575f91610cca575b5092610b3a565b90506020813d602011610cf4575b81610ce5602093836112be565b8101031261026657515f610cc3565b3d9150610cd8565b83513d5f823e3d90fd5b8234610266575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266576020905160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346102665760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026657610d996111f2565b610da1611215565b6044359160025493610db960028660f81c141561132c565b7f02000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8096161760025573ffffffffffffffffffffffffffffffffffffffff82165f526001602052855f20335f52602052855f2054907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e85575b6020877f010000000000000000000000000000000000000000000000000000000000000088610834898989611522565b848210610ed2575092602095949261083492610ec5837f0100000000000000000000000000000000000000000000000000000000000000970333836113a4565b9250929495819450610e55565b60649060208851917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152fd5b8234610266575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266576020907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600254169051908152f35b823461026657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026657602090610fd3610fc96111f2565b60243590336113a4565b5160018152f35b509034610266575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266578051905f9260035460018160011c9160018116801561111a575b60209485851082146110ee57508387529081156110b05750600114611056575b5050506108be826108c89403836112be565b60035f9081529295507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b82841061109d57505050826108c8946108be9282010194611044565b8054868501880152928601928101611081565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016868501525050151560051b83010192506108be826108c8611044565b6022907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b92607f1692611024565b5090346102665760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026657610a6660209261118761017c7f0000000000000000000000000000000000000000000000000000000000000000611238565b9035611287565b6020808252825181830181905293925f5b8581106111de575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6040809697860101520116010190565b81810183015184820160400152820161119f565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361026657565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361026657565b60ff166012039060ff821161124957565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60ff16604d811161124957600a0a90565b8115611291570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176112ff57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b1561133357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b8181029291811591840414171561124957565b73ffffffffffffffffffffffffffffffffffffffff809116918215611492571691821561140e5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591835f526001825260405f20855f5282528060405f2055604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b9190820180921161124957565b73ffffffffffffffffffffffffffffffffffffffff80911691821561171857169182156116945782821461163657815f525f60205260405f20548181106115b257817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f5260405f206115a7828254611515565b9055604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f45524332303a207472616e7366657220746f2073656c660000000000000000006044820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152fd5b3d156117f4573d9067ffffffffffffffff82116112ff57604051916117e960207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601846112be565b82523d5f602084013e565b606090565b82156118f75773ffffffffffffffffffffffffffffffffffffffff90811690816118955750505f80809381935af161182f61179c565b501561183757565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6574682073656e64206661696c656400000000000000000000000000000000006044820152fd5b604093919351927fa9059cbb000000000000000000000000000000000000000000000000000000006020850152166024830152604482015260448152608081019181831067ffffffffffffffff8411176112ff576118f5926040526118fc565b565b505050565b73ffffffffffffffffffffffffffffffffffffffff16604051604081019181831067ffffffffffffffff8411176112ff57611978926040525f806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af161197261179c565b91611a35565b8051828115918215611a15575b50509050156119915750565b608490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b83809293500103126102665781015180151581036102665780825f611985565b91929015611ab05750815115611a49575090565b3b15611a525790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b825190915015611ac35750805190602001fd5b611af9906040519182917f08c379a00000000000000000000000000000000000000000000000000000000083526004830161118e565b0390fdfea2646970667358221220b41870dc81c55da892a060c23cb6d0e02716353ef833dcd4b3f04046f638be6964736f6c63430008180033a26469706673582212207d4b02a0b35d84a213839fee32ebfc562c03f477cc285d2fa2bfbea22a3df35c64736f6c63430008180033000000000000000000000000cbcb48e22622a3778b6f14c2f5d258ba026b05e6
Deployed Bytecode
0x6080604090808252600436101562000015575f80fd5b5f3560e01c90816341fa541614620003a45750806362b9b179146200035b5763975d8cc31462000043575f80fd5b346200035757620000543662000412565b919073ffffffffffffffffffffffffffffffffffffffff80911691825f526020935f855260ff825f20911690815f52855282825f2054169384156200009d575b50505191168152f35b90919350601282036200032a5783517f06fdde030000000000000000000000000000000000000000000000000000000081525f81600481855afa90811562000320575f9162000302575b506200013c60298651836200010682955180928c8086019101620004b2565b81017f207363616c6564313800000000000000000000000000000000000000000000008a82015203600981018452018262000470565b8451907f95d89b410000000000000000000000000000000000000000000000000000000082525f82600481865afa918215620002f8575f92620002cf575b50620001cf60298751846200019982965180928d8086019101620004b2565b81017f2d7363616c6564313800000000000000000000000000000000000000000000008b82015203600981018552018362000470565b85519161202a908184019184831067ffffffffffffffff841117620002a2576200021f86926200021187968c94620005ae893960608752606087019062000568565b908582038d87015262000568565b92015203905ff0801562000298578316918183925f525f8752855f20825f528752855f20837fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790557f253d1f0c6a570b2bcd82e95c7259022a432e806a0b38e893d99e1c8a2accde425f80a4915f8062000094565b84513d5f823e3d90fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620002f09192503d805f833e620002e7818362000470565b810190620004d5565b905f6200017a565b86513d5f823e3d90fd5b6200031991503d805f833e620002e7818362000470565b5f620000e7565b85513d5f823e3d90fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52600160045260245ffd5b5f80fd5b50346200035757602090620003703662000412565b73ffffffffffffffffffffffffffffffffffffffff8092165f525f845260ff835f2091165f528352815f2054169051908152f35b3462000357575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620003575760209073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000cbcb48e22622a3778b6f14c2f5d258ba026b05e6168152f35b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6040910112620003575760043573ffffffffffffffffffffffffffffffffffffffff8116810362000357579060243560ff81168103620003575790565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117620002a257604052565b5f5b838110620004c45750505f910152565b8181015183820152602001620004b4565b6020818303126200035757805167ffffffffffffffff918282116200035757019082601f8301121562000357578151908111620002a257604051926200054460207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f850116018562000470565b818452602082840101116200035757620005659160208085019101620004b2565b90565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093620005a681518092818752878088019101620004b2565b011601019056fe61010080604052346200025c576200202a80380380916200002182856200045e565b83398101906060818303126200025c5780516001600160401b0392908381116200025c57816200005391840162000482565b92602091828401518281116200025c576040916200007391860162000482565b9301516001600160a01b038116918282036200025c57855181811162000369576003908154906001988983811c9316801562000453575b888410146200043f578190601f93848111620003ec575b50889084831160011462000389575f926200037d575b50505f1982851b1c191690891b1782555b8651928311620003695760049687548981811c911680156200035e575b888210146200034b57918795939183828b99979511620002e9575b50869184116001146200027f575f9291908462000273575b5050828a1b925f19911b1c19161784555b6012608052600280546001600160f81b0316600160f81b17905560c0523360a05260405163313ce56760e01b815292839182905afa91821562000268575f9262000223575b505060ff8160129260e05216116200021357604051611b339081620004f7823960805181610d3d015260a0518181816106de0152610bcc015260c05181818161010b015281816104f10152818161074c0152610b0f015260e051818181610158015281816104bf01528181610a3b01528181610aa401528181610b6901526111630152f35b634e487b7160e01b5f525260245ffd5b90809250813d831162000260575b6200023d81836200045e565b810103126200025c575160ff811681036200025c5760ff60126200018e565b5f80fd5b503d62000231565b6040513d5f823e3d90fd5b015191505f8062000138565b90918a9392601f19841692895f52885f20935f5b818110620002cd57508511620002b3575b50505050811b01845562000149565b01519060f8845f19921b161c191690555f808080620002a4565b8284015186558d9b508c9a8f9890960195938401930162000293565b9193959790929496505f52875f208380870160051c8201928a881062000341575b8a989694928c9a98968e929593950160051c01915b8281106200032f57505062000120565b5f81558c9a508b99508d91016200031f565b925081926200030a565b602289634e487b7160e01b5f525260245ffd5b90607f169062000105565b634e487b7160e01b5f52604160045260245ffd5b015190505f80620000d7565b908b9350601f19831691865f528a5f20925f5b8c828210620003d55750508411620003bd575b505050811b018255620000e8565b01515f1983871b60f8161c191690555f8080620003af565b8385015186558f979095019493840193016200039c565b909150845f52885f208480850160051c8201928b861062000435575b918d91869594930160051c01915b82811062000426575050620000c1565b5f81558594508d910162000416565b9250819262000408565b634e487b7160e01b5f52602260045260245ffd5b92607f1692620000aa565b601f909101601f19168101906001600160401b038211908210176200036957604052565b919080601f840112156200025c5782516001600160401b038111620003695760209060405192620004bd83601f19601f85011601856200045e565b8184528282870101116200025c575f5b818110620004e25750825f9394955001015290565b8581018301518482018401528201620004cd56fe604060808152600480361015610013575f80fd5b5f3560e01c8063054be8021461112457806306fdde0314610fda578063095ea7b314610f8c57806318160ddd14610f2f57806323b872dd14610d61578063313ce56714610d0657806335faa41614610ac85780633b97423f14610a6d57806345a67b86146109fc57806370a082311461099b57806395d89b4114610843578063a9059cbb14610770578063aef79a4f14610702578063c45a015514610694578063dd62ed3e1461061f578063de0e9a3e146103c85763ea598cb0146100d6575f80fd5b3461026657602091827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102665781357f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16806103215750806102c557610187905b61018161017c7f0000000000000000000000000000000000000000000000000000000000000000611238565b611276565b90611391565b91331561026a577effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8084116102665760025491818516828416019082821161023a5750907fff000000000000000000000000000000000000000000000000000000000000009116911617600255335f525f8352805f20610207838254611515565b905580518281525f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef853393a351908152f35b6011907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b5f80fd5b8360649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152fd5b509160649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152600c60248201527f657468206d69736d6174636800000000000000000000000000000000000000006044820152fd5b81610331575b5061018790610150565b8251907f23b872dd00000000000000000000000000000000000000000000000000000000868301523360248301523060448301528260648301526064825260a0820182811067ffffffffffffffff82111761039c5784526101879291610396916118fc565b90610327565b6041867f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b50903461026657602091827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026657803590331561059d57335f525f8452825f205482811061051b578290335f525f865203835f20557effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8083116102665760025491818416828416039082821161023a57506104e99392917fff0000000000000000000000000000000000000000000000000000000000000091169116176002555f83518281527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef863392a36104e361017c7f0000000000000000000000000000000000000000000000000000000000000000611238565b90611287565b9061051582337f00000000000000000000000000000000000000000000000000000000000000006117f9565b51908152f35b608482868651917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152fd5b608490848451917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152fd5b823461026657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266576020906106596111f2565b610661611215565b9073ffffffffffffffffffffffffffffffffffffffff8091165f5260018452825f2091165f528252805f20549051908152f35b8234610266575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b8234610266575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461026657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266576020907f01000000000000000000000000000000000000000000000000000000000000006107cb6111f2565b610834600254916107e260028460f81c141561132c565b7f02000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff809416176002556024359033611522565b60025416176002555160018152f35b509034610266575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266578051905f9280549060018260011c9160018416938415610991575b60209485851081146109655784885290811561092557506001146108cc575b6108c886866108be828b03836112be565b519182918261118e565b0390f35b5f9081529295507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b82841061091257505050826108c8946108be92820101945f6108ad565b80548685018801529286019281016108f5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001687860152505050151560051b83010192506108be826108c85f6108ad565b6022837f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b92607f169261088e565b82346102665760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102665760209073ffffffffffffffffffffffffffffffffffffffff6109eb6111f2565b165f525f8252805f20549051908152f35b5090346102665760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026657610a66602092610a5f61017c7f0000000000000000000000000000000000000000000000000000000000000000611238565b9035611391565b9051908152f35b8234610266575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266576020905160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5034610266575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102665773ffffffffffffffffffffffffffffffffffffffff917f000000000000000000000000000000000000000000000000000000000000000083811680610c80575047925b610b8d7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600254166104e361017c7f0000000000000000000000000000000000000000000000000000000000000000611238565b80850394808611610c545703610b9f57005b6020835180927f41fa541600000000000000000000000000000000000000000000000000000000825281887f0000000000000000000000000000000000000000000000000000000000000000165afa928315610c4b57505f92610c0a575b50610c0893506117f9565b005b9091506020813d602011610c43575b81610c26602093836112be565b810103126102665751928316830361026657610c0892905f610bfd565b3d9150610c19565b513d5f823e3d90fd5b6011837f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b60206024918451928380927f70a0823100000000000000000000000000000000000000000000000000000000825230898301525afa908115610cfc575f91610cca575b5092610b3a565b90506020813d602011610cf4575b81610ce5602093836112be565b8101031261026657515f610cc3565b3d9150610cd8565b83513d5f823e3d90fd5b8234610266575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266576020905160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346102665760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026657610d996111f2565b610da1611215565b6044359160025493610db960028660f81c141561132c565b7f02000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8096161760025573ffffffffffffffffffffffffffffffffffffffff82165f526001602052855f20335f52602052855f2054907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e85575b6020877f010000000000000000000000000000000000000000000000000000000000000088610834898989611522565b848210610ed2575092602095949261083492610ec5837f0100000000000000000000000000000000000000000000000000000000000000970333836113a4565b9250929495819450610e55565b60649060208851917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152fd5b8234610266575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266576020907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600254169051908152f35b823461026657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026657602090610fd3610fc96111f2565b60243590336113a4565b5160018152f35b509034610266575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610266578051905f9260035460018160011c9160018116801561111a575b60209485851082146110ee57508387529081156110b05750600114611056575b5050506108be826108c89403836112be565b60035f9081529295507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b82841061109d57505050826108c8946108be9282010194611044565b8054868501880152928601928101611081565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016868501525050151560051b83010192506108be826108c8611044565b6022907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b92607f1692611024565b5090346102665760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026657610a6660209261118761017c7f0000000000000000000000000000000000000000000000000000000000000000611238565b9035611287565b6020808252825181830181905293925f5b8581106111de575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6040809697860101520116010190565b81810183015184820160400152820161119f565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361026657565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361026657565b60ff166012039060ff821161124957565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60ff16604d811161124957600a0a90565b8115611291570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176112ff57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b1561133357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b8181029291811591840414171561124957565b73ffffffffffffffffffffffffffffffffffffffff809116918215611492571691821561140e5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591835f526001825260405f20855f5282528060405f2055604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b9190820180921161124957565b73ffffffffffffffffffffffffffffffffffffffff80911691821561171857169182156116945782821461163657815f525f60205260405f20548181106115b257817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f5260405f206115a7828254611515565b9055604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f45524332303a207472616e7366657220746f2073656c660000000000000000006044820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152fd5b3d156117f4573d9067ffffffffffffffff82116112ff57604051916117e960207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601846112be565b82523d5f602084013e565b606090565b82156118f75773ffffffffffffffffffffffffffffffffffffffff90811690816118955750505f80809381935af161182f61179c565b501561183757565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6574682073656e64206661696c656400000000000000000000000000000000006044820152fd5b604093919351927fa9059cbb000000000000000000000000000000000000000000000000000000006020850152166024830152604482015260448152608081019181831067ffffffffffffffff8411176112ff576118f5926040526118fc565b565b505050565b73ffffffffffffffffffffffffffffffffffffffff16604051604081019181831067ffffffffffffffff8411176112ff57611978926040525f806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af161197261179c565b91611a35565b8051828115918215611a15575b50509050156119915750565b608490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b83809293500103126102665781015180151581036102665780825f611985565b91929015611ab05750815115611a49575090565b3b15611a525790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b825190915015611ac35750805190602001fd5b611af9906040519182917f08c379a00000000000000000000000000000000000000000000000000000000083526004830161118e565b0390fdfea2646970667358221220b41870dc81c55da892a060c23cb6d0e02716353ef833dcd4b3f04046f638be6964736f6c63430008180033a26469706673582212207d4b02a0b35d84a213839fee32ebfc562c03f477cc285d2fa2bfbea22a3df35c64736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000cbcb48e22622a3778b6f14c2f5d258ba026b05e6
-----Decoded View---------------
Arg [0] : _dustReceiver (address): 0xCbcb48e22622a3778b6F14C2f5d258Ba026b05e6
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000cbcb48e22622a3778b6f14c2f5d258ba026b05e6
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in S
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.