Token
Prime pwEth (pwEth)
ERC-20
Overview
Max Total Supply
6 pwEth
Holders
2
Market
Price
$0.00 @ 0.000000 DEV
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
5 pwEthLoading...
Loading
Loading...
Loading
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x520bFF26...A90072B25 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
LoanAsset
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; // import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "../../middleLayer/interfaces/IMiddleLayer.sol"; import "../../interfaces/IHelper.sol"; import "./LoanAssetStorage.sol"; import "./LoanAssetMessageHandler.sol"; import "./LoanAssetAdmin.sol"; contract LoanAsset is LoanAssetAdmin, LoanAssetMessageHandler { constructor( string memory _tknName, string memory _tknSymbol, uint8 __decimals ) ERC20(_tknName, _tknSymbol) { if (bytes(_tknName).length == 0) revert NameExpected(); if (bytes(_tknSymbol).length == 0) revert SymbolExpected(); admin = msg.sender; _decimals = __decimals; } function mint( address to, uint256 amount ) external override onlyMintAuth() { if (amount == 0) revert ExpectedMintAmount(); _mint(to, amount); } /** * @notice Burn tokens on the local chain and mint on the destination chain * @dev Accrues interest whether or not the operation succeeds, unless reverted * @param dstChainId Destination chain to mint * @param receiver Wallet that is sending/burning loanAsset * @param amount Amount to burn locally/mint on the destination chain */ function sendTokensToChain( address receiver, address route, uint256 dstChainId, uint256 amount ) external payable { if (paused) revert TransferPaused(); if (amount == 0) revert ExpectedTransferAmount(); _sendTokensToChain(receiver, route, dstChainId, amount); } fallback() external payable {} receive() payable external {} }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.4; abstract contract IMiddleLayer { /** * @notice routes and encodes messages for you * @param _params - abi.encode() of the struct related to the selector, used to generate _payload * all params starting with '_' are directly sent to the 'send()' function */ function msend( uint256 _dstChainId, bytes memory _params, address payable _refundAddress, address _fallbackAddress, bool _shouldPayGas ) external payable virtual; function mreceive( uint256 _srcChainId, bytes memory _payload ) external virtual; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; interface IHelper { enum Selector { MASTER_DEPOSIT, MASTER_WITHDRAW_ALLOWED, FB_WITHDRAW, MASTER_REPAY, MASTER_BORROW_ALLOWED, FB_BORROW, SATELLITE_LIQUIDATE_BORROW, LOAN_ASSET_BRIDGE } // !!!! // @dev // an artificial uint256 param for metadata should be added // after packing the payload // metadata can be generated via call to ecc.preRegMsg() struct MDeposit { uint256 metadata; // LEAVE ZERO Selector selector; // = Selector.MASTER_DEPOSIT address user; address pToken; uint256 exchangeRate; uint256 depositAmount; } struct MWithdrawAllowed { uint256 metadata; // LEAVE ZERO Selector selector; // = Selector.MASTER_WITHDRAW_ALLOWED address pToken; address user; uint256 withdrawAmount; uint256 exchangeRate; } struct FBWithdraw { uint256 metadata; // LEAVE ZERO Selector selector; // = Selector.FB_WITHDRAW address pToken; address user; uint256 withdrawAmount; uint256 exchangeRate; } struct MRepay { uint256 metadata; // LEAVE ZERO Selector selector; // = Selector.MASTER_REPAY address borrower; uint256 amountRepaid; address loanMarketAsset; } struct MBorrowAllowed { uint256 metadata; // LEAVE ZERO Selector selector; // = Selector.MASTER_BORROW_ALLOWED address user; uint256 borrowAmount; address loanMarketAsset; } struct FBBorrow { uint256 metadata; // LEAVE ZERO Selector selector; // = Selector.FB_BORROW address user; uint256 borrowAmount; address loanMarketAsset; } struct SLiquidateBorrow { uint256 metadata; // LEAVE ZERO Selector selector; // = Selector.SATELLITE_LIQUIDATE_BORROW address borrower; address liquidator; uint256 seizeTokens; address pToken; } struct LoanAssetBridge { uint256 metadata; // LEAVE ZERO Selector selector; // = Selector.LOAN_ASSET_BRIDGE address minter; bytes32 loanAssetNameHash; uint256 amount; } }
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.4; import "../../middleLayer/interfaces/IMiddleLayer.sol"; abstract contract LoanAssetStorage { /** * @notice Administrator for this contract */ address public admin; /** * @notice Underlying asset for this contract */ address public underlyingAsset; /** * @notice Underlying chain id for this contract */ uint256 public underlyingChainId; /** * @notice Indicates whether the loanAsset is currently bridgeable */ bool internal paused; /** * @notice Synthetic Asset Decimals */ uint8 internal _decimals; /** * @notice MiddleLayer Interface */ IMiddleLayer internal middleLayer; /** * @notice Mapping of minting permissions */ mapping(address /* facilitator */ => bool /* isAuth */) public mintAuth; }
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "./LoanAssetStorage.sol"; import "./LoanAssetAdmin.sol"; import "../../interfaces/IHelper.sol"; import "../../util/CommonModifiers.sol"; abstract contract LoanAssetMessageHandler is LoanAssetStorage, LoanAssetAdmin, ERC20Burnable, CommonModifiers { function decimals() public view override returns (uint8) { return _decimals; } // slither-disable-next-line assembly function _sendTokensToChain( address receiver, address route, uint256 _dstChainId, uint256 amount ) internal { // burn senders loanAsset locally _burn(msg.sender, amount); bytes memory payload = abi.encode( IHelper.LoanAssetBridge({ metadata: uint256(0), selector: IHelper.Selector.LOAN_ASSET_BRIDGE, minter: receiver, loanAssetNameHash: keccak256(abi.encode(this.symbol())), amount: amount }) ); middleLayer.msend{ value: msg.value }( _dstChainId, payload, payable(receiver), // refund address route, true ); emit SentToChain(receiver, _dstChainId, amount); } function mintFromChain( IHelper.LoanAssetBridge memory params, uint256 srcChain ) external onlyMid() { _mint(params.minter, params.amount); emit ReceiveFromChain(params.minter, srcChain, params.amount); } }
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.4; import "./interfaces/ILoanAsset.sol"; import "./LoanAssetModifiers.sol"; import "./LoanAssetEvents.sol"; abstract contract LoanAssetAdmin is ILoanAsset, LoanAssetModifiers, LoanAssetEvents { function pauseSendTokens( bool newPauseStatus ) external onlyAdmin() { emit Paused(paused, newPauseStatus); paused = newPauseStatus; } function setMiddleLayer( address newMiddleLayer ) external onlyAdmin() { if (newMiddleLayer == address(0)) revert AddressExpected(); emit SetMiddleLayer(address(middleLayer), newMiddleLayer); middleLayer = IMiddleLayer(newMiddleLayer); } function changeMintAuth( address minter, bool isAuth ) external onlyAdmin() { mintAuth[minter] = isAuth; emit ChangeMintAuth(minter, isAuth); } function changeAdmin( address newAdmin ) external onlyAdmin() { if (newAdmin == address(0)) revert AddressExpected(); emit ChangeAdmin(admin, newAdmin); admin = newAdmin; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { _spendAllowance(account, _msgSender(), amount); _burn(account, amount); } }
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.4; import "./CommonErrors.sol"; abstract contract CommonModifiers is CommonErrors { /** * @dev Guard variable for re-entrancy checks */ bool internal entered; /** * @dev Prevents a contract from calling itself, directly or indirectly. */ modifier nonReentrant() { if (entered) revert Reentrancy(); entered = true; _; entered = false; // get a gas-refund post-Istanbul } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, _allowances[owner][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = _allowances[owner][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } 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"); _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 += 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 -= 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 Spend `amount` form the allowance of `owner` toward `spender`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `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); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // 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: Unlicense pragma solidity ^0.8.4; interface ILoanAsset { function mint(address to, uint256 amount) external; }
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.4; import "./LoanAssetStorage.sol"; import "../../util/CommonErrors.sol"; abstract contract LoanAssetModifiers is LoanAssetStorage, CommonErrors { modifier onlyMintAuth() { if (!mintAuth[msg.sender]) revert OnlyMintAuth(); _; } modifier onlyAdmin() { if(msg.sender != admin) revert OnlyAdmin(); _; } modifier onlyMid() { if (msg.sender != address(middleLayer)) revert OnlyMiddleLayer(); _; } }
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.4; abstract contract LoanAssetEvents { /*** User Events ***/ /** * @notice Event emitted when LoanAsset is sent cross-chain */ event SentToChain( address toAddress, uint256 destChainId, uint256 amount ); /** * @notice Event emitted when LoanAsset is received cross-chain */ event ReceiveFromChain( address toAddress, uint256 srcChainId, uint256 amount ); /*** Admin Events ***/ event Paused( bool previousStatus, bool newStatus ); event SetMiddleLayer( address oldMiddleLayer, address newMiddleLayer ); event ChangeMintAuth( address minter, bool auth ); event ChangeAdmin( address oldAdmin, address newAdmin ); }
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.4; abstract contract CommonErrors { error AccountNoAssets(address account); error AddressExpected(); error AlreadyInitialized(); error EccMessageAlreadyProcessed(); error EccFailedToValidate(); error ExpectedMintAmount(); error ExpectedBridgeAmount(); error ExpectedBorrowAmount(); error ExpectedWithdrawAmount(); error ExpectedRepayAmount(); error ExpectedTradeAmount(); error ExpectedDepositAmount(); error ExpectedTransferAmount(); error InsufficientReserves(); error InvalidPayload(); error InvalidPrice(); error InvalidPrecision(); error InvalidSelector(); error MarketExists(); error LoanMarketIsListed(bool status); error MarketIsPaused(); error MarketNotListed(); error MsgDataExpected(); error NameExpected(); error NothingToWithdraw(); error NotInMarket(uint256 chainId, address token); error OnlyAdmin(); error OnlyAuth(); error OnlyGateway(); error OnlyMiddleLayer(); error OnlyMintAuth(); error OnlyRoute(); error OnlyRouter(); error OnlyMasterState(); error ParamOutOfBounds(); error RouteExists(); error Reentrancy(); error EnterLoanMarketFailed(); error EnterCollMarketFailed(); error ExitLoanMarketFailed(); error ExitCollMarketFailed(); error RepayTooMuch(uint256 repayAmount, uint256 maxAmount); error WithdrawTooMuch(); error NotEnoughBalance(address token, address who); error LiquidateDisallowed(); error SeizeTooMuch(); error SymbolExpected(); error RouteNotSupported(address route); error MiddleLayerPaused(); error PairNotSupported(address loanAsset, address tradeAsset); error TransferFailed(address from, address dest); error TransferPaused(); error UnknownRevert(); error UnexpectedValueDelta(); error ExpectedValue(); error UnexpectedDelta(); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"inputs":[{"internalType":"string","name":"_tknName","type":"string"},{"internalType":"string","name":"_tknSymbol","type":"string"},{"internalType":"uint8","name":"__decimals","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AccountNoAssets","type":"error"},{"inputs":[],"name":"AddressExpected","type":"error"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"EccFailedToValidate","type":"error"},{"inputs":[],"name":"EccMessageAlreadyProcessed","type":"error"},{"inputs":[],"name":"EnterCollMarketFailed","type":"error"},{"inputs":[],"name":"EnterLoanMarketFailed","type":"error"},{"inputs":[],"name":"ExitCollMarketFailed","type":"error"},{"inputs":[],"name":"ExitLoanMarketFailed","type":"error"},{"inputs":[],"name":"ExpectedBorrowAmount","type":"error"},{"inputs":[],"name":"ExpectedBridgeAmount","type":"error"},{"inputs":[],"name":"ExpectedDepositAmount","type":"error"},{"inputs":[],"name":"ExpectedMintAmount","type":"error"},{"inputs":[],"name":"ExpectedRepayAmount","type":"error"},{"inputs":[],"name":"ExpectedTradeAmount","type":"error"},{"inputs":[],"name":"ExpectedTransferAmount","type":"error"},{"inputs":[],"name":"ExpectedValue","type":"error"},{"inputs":[],"name":"ExpectedWithdrawAmount","type":"error"},{"inputs":[],"name":"InsufficientReserves","type":"error"},{"inputs":[],"name":"InvalidPayload","type":"error"},{"inputs":[],"name":"InvalidPrecision","type":"error"},{"inputs":[],"name":"InvalidPrice","type":"error"},{"inputs":[],"name":"InvalidSelector","type":"error"},{"inputs":[],"name":"LiquidateDisallowed","type":"error"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"LoanMarketIsListed","type":"error"},{"inputs":[],"name":"MarketExists","type":"error"},{"inputs":[],"name":"MarketIsPaused","type":"error"},{"inputs":[],"name":"MarketNotListed","type":"error"},{"inputs":[],"name":"MiddleLayerPaused","type":"error"},{"inputs":[],"name":"MsgDataExpected","type":"error"},{"inputs":[],"name":"NameExpected","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"who","type":"address"}],"name":"NotEnoughBalance","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"token","type":"address"}],"name":"NotInMarket","type":"error"},{"inputs":[],"name":"NothingToWithdraw","type":"error"},{"inputs":[],"name":"OnlyAdmin","type":"error"},{"inputs":[],"name":"OnlyAuth","type":"error"},{"inputs":[],"name":"OnlyGateway","type":"error"},{"inputs":[],"name":"OnlyMasterState","type":"error"},{"inputs":[],"name":"OnlyMiddleLayer","type":"error"},{"inputs":[],"name":"OnlyMintAuth","type":"error"},{"inputs":[],"name":"OnlyRoute","type":"error"},{"inputs":[],"name":"OnlyRouter","type":"error"},{"inputs":[{"internalType":"address","name":"loanAsset","type":"address"},{"internalType":"address","name":"tradeAsset","type":"address"}],"name":"PairNotSupported","type":"error"},{"inputs":[],"name":"ParamOutOfBounds","type":"error"},{"inputs":[],"name":"Reentrancy","type":"error"},{"inputs":[{"internalType":"uint256","name":"repayAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"name":"RepayTooMuch","type":"error"},{"inputs":[],"name":"RouteExists","type":"error"},{"inputs":[{"internalType":"address","name":"route","type":"address"}],"name":"RouteNotSupported","type":"error"},{"inputs":[],"name":"SeizeTooMuch","type":"error"},{"inputs":[],"name":"SymbolExpected","type":"error"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"dest","type":"address"}],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"TransferPaused","type":"error"},{"inputs":[],"name":"UnexpectedDelta","type":"error"},{"inputs":[],"name":"UnexpectedValueDelta","type":"error"},{"inputs":[],"name":"UnknownRevert","type":"error"},{"inputs":[],"name":"WithdrawTooMuch","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"ChangeAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"bool","name":"auth","type":"bool"}],"name":"ChangeMintAuth","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"previousStatus","type":"bool"},{"indexed":false,"internalType":"bool","name":"newStatus","type":"bool"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"srcChainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReceiveFromChain","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"destChainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SentToChain","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldMiddleLayer","type":"address"},{"indexed":false,"internalType":"address","name":"newMiddleLayer","type":"address"}],"name":"SetMiddleLayer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"changeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"bool","name":"isAuth","type":"bool"}],"name":"changeMintAuth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintAuth","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"metadata","type":"uint256"},{"internalType":"enum IHelper.Selector","name":"selector","type":"uint8"},{"internalType":"address","name":"minter","type":"address"},{"internalType":"bytes32","name":"loanAssetNameHash","type":"bytes32"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IHelper.LoanAssetBridge","name":"params","type":"tuple"},{"internalType":"uint256","name":"srcChain","type":"uint256"}],"name":"mintFromChain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"newPauseStatus","type":"bool"}],"name":"pauseSendTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"route","type":"address"},{"internalType":"uint256","name":"dstChainId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"sendTokensToChain","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newMiddleLayer","type":"address"}],"name":"setMiddleLayer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"underlyingAsset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlyingChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200199b3803806200199b833981016040819052620000349162000252565b8251839083906200004d906008906020850190620000df565b50805162000063906009906020840190620000df565b5050508251600014156200008a57604051633001eccf60e21b815260040160405180910390fd5b8151620000aa57604051636e11843f60e11b815260040160405180910390fd5b600080546001600160a01b031916331790556003805460ff9092166101000261ff001990921691909117905550620003149050565b828054620000ed90620002d7565b90600052602060002090601f0160209004810192826200011157600085556200015c565b82601f106200012c57805160ff19168380011785556200015c565b828001600101855582156200015c579182015b828111156200015c5782518255916020019190600101906200013f565b506200016a9291506200016e565b5090565b5b808211156200016a57600081556001016200016f565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001ad57600080fd5b81516001600160401b0380821115620001ca57620001ca62000185565b604051601f8301601f19908116603f01168101908282118183101715620001f557620001f562000185565b816040528381526020925086838588010111156200021257600080fd5b600091505b8382101562000236578582018301518183018401529082019062000217565b83821115620002485760008385830101525b9695505050505050565b6000806000606084860312156200026857600080fd5b83516001600160401b03808211156200028057600080fd5b6200028e878388016200019b565b94506020860151915080821115620002a557600080fd5b50620002b4868287016200019b565b925050604084015160ff81168114620002cc57600080fd5b809150509250925092565b600181811c90821680620002ec57607f821691505b602082108114156200030e57634e487b7160e01b600052602260045260246000fd5b50919050565b61167780620003246000396000f3fe6080604052600436106101435760003560e01c806365f32edd116100b0578063a457c2d71161006c578063a457c2d7146103d9578063a9059cbb146103f9578063cb9520e214610419578063dd62ed3e1461042c578063f187892214610472578063f851a4401461049257005b806365f32edd146102f657806370a08231146103165780637158da7c1461034c57806379cc6790146103845780638f283970146103a457806395d89b41146103c457005b8063313ce567116100ff578063313ce5671461021c578063395093511461024657806340c10f191461026657806342966c681461028657806344ac5027146102a657806350dcef50146102c657005b806306fdde031461014c578063095ea7b31461017757806316c9e965146101a757806318160ddd146101c757806318e34399146101e657806323b872dd146101fc57005b3661014a57005b005b34801561015857600080fd5b506101616104b2565b60405161016e919061122d565b60405180910390f35b34801561018357600080fd5b50610197610192366004611263565b610544565b604051901515815260200161016e565b3480156101b357600080fd5b5061014a6101c23660046112a3565b61055c565b3480156101d357600080fd5b506007545b60405190815260200161016e565b3480156101f257600080fd5b506101d860025481565b34801561020857600080fd5b50610197610217366004611339565b6105f9565b34801561022857600080fd5b50600354610100900460ff1660405160ff909116815260200161016e565b34801561025257600080fd5b50610197610261366004611263565b61061d565b34801561027257600080fd5b5061014a610281366004611263565b61065c565b34801561029257600080fd5b5061014a6102a1366004611375565b6106b8565b3480156102b257600080fd5b5061014a6102c136600461138e565b6106c5565b3480156102d257600080fd5b506101976102e136600461138e565b60046020526000908152604090205460ff1681565b34801561030257600080fd5b5061014a6103113660046113b9565b61078e565b34801561032257600080fd5b506101d861033136600461138e565b6001600160a01b031660009081526005602052604090205490565b34801561035857600080fd5b5060015461036c906001600160a01b031681565b6040516001600160a01b03909116815260200161016e565b34801561039057600080fd5b5061014a61039f366004611263565b610815565b3480156103b057600080fd5b5061014a6103bf36600461138e565b61082a565b3480156103d057600080fd5b506101616108e5565b3480156103e557600080fd5b506101976103f4366004611263565b6108f4565b34801561040557600080fd5b50610197610414366004611263565b61098b565b61014a6104273660046113ec565b610999565b34801561043857600080fd5b506101d861044736600461142e565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b34801561047e57600080fd5b5061014a61048d366004611458565b6109ed565b34801561049e57600080fd5b5060005461036c906001600160a01b031681565b6060600880546104c190611473565b80601f01602080910402602001604051908101604052809291908181526020018280546104ed90611473565b801561053a5780601f1061050f5761010080835404028352916020019161053a565b820191906000526020600020905b81548152906001019060200180831161051d57829003601f168201915b5050505050905090565b600033610552818585610a6e565b5060019392505050565b6003546201000090046001600160a01b0316331461058d5760405163275e4def60e01b815260040160405180910390fd5b61059f82604001518360800151610b93565b604080830151608084015182516001600160a01b03909216825260208201849052918101919091527fe2b5ff2eca7b4593a96d009a8c6516686771f4c32523493acb9cc2ac69b5b809906060015b60405180910390a15050565b600033610607858285610c72565b610612858585610cfe565b506001949350505050565b3360008181526006602090815260408083206001600160a01b038716845290915281205490919061055290829086906106579087906114c4565b610a6e565b3360009081526004602052604090205460ff1661068c5760405163eb1d984360e01b815260040160405180910390fd5b806106aa57604051635517a95560e11b815260040160405180910390fd5b6106b48282610b93565b5050565b6106c23382610ecc565b50565b6000546001600160a01b031633146106f057604051634755657960e01b815260040160405180910390fd5b6001600160a01b03811661071757604051635f3ee81760e01b815260040160405180910390fd5b600354604080516001600160a01b03620100009093048316815291831660208301527f5bf96fd739fbcbe90a13fe959204e05f9de23508ccd4193c378db1a6c02329dd910160405180910390a1600380546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b6000546001600160a01b031633146107b957604051634755657960e01b815260040160405180910390fd5b6001600160a01b038216600081815260046020908152604091829020805460ff19168515159081179091558251938452908301527f55bbb2f70b2c0c05e848afef6c2df1d6e2ecbc7913a53898298e136d64a21aa391016105ed565b610820823383610c72565b6106b48282610ecc565b6000546001600160a01b0316331461085557604051634755657960e01b815260040160405180910390fd5b6001600160a01b03811661087c57604051635f3ee81760e01b815260040160405180910390fd5b600054604080516001600160a01b03928316815291831660208301527fcf9b665e0639e0b81a8db37b60ac7ddf45aeb1b484e11adeb7dff4bf4a3a6258910160405180910390a1600080546001600160a01b0319166001600160a01b0392909216919091179055565b6060600980546104c190611473565b3360008181526006602090815260408083206001600160a01b03871684529091528120549091908381101561097e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6106128286868403610a6e565b600033610552818585610cfe565b60035460ff16156109bd5760405163cd1fda9f60e01b815260040160405180910390fd5b806109db576040516301bdc2ad60e21b815260040160405180910390fd5b6109e784848484611012565b50505050565b6000546001600160a01b03163314610a1857604051634755657960e01b815260040160405180910390fd5b6003546040805160ff9092161515825282151560208301527fc043f4e3ac3241bbac51f8b5ac104d9aac3ea4d455b3c8050f080a4dd6a81273910160405180910390a16003805460ff1916911515919091179055565b6001600160a01b038316610ad05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610975565b6001600160a01b038216610b315760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610975565b6001600160a01b0383811660008181526006602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038216610be95760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610975565b8060076000828254610bfb91906114c4565b90915550506001600160a01b03821660009081526005602052604081208054839290610c289084906114c4565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0383811660009081526006602090815260408083209386168352929052205460001981146109e75781811015610cf15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610975565b6109e78484848403610a6e565b6001600160a01b038316610d625760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610975565b6001600160a01b038216610dc45760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610975565b6001600160a01b03831660009081526005602052604090205481811015610e3c5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610975565b6001600160a01b03808516600090815260056020526040808220858503905591851681529081208054849290610e739084906114c4565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610ebf91815260200190565b60405180910390a36109e7565b6001600160a01b038216610f2c5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610975565b6001600160a01b03821660009081526005602052604090205481811015610fa05760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610975565b6001600160a01b0383166000908152600560205260408120838303905560078054849290610fcf9084906114dc565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610b86565b61101c3382610ecc565b6040805160a081019091526000808252906020810160078152602001866001600160a01b03168152602001306001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b15801561108057600080fd5b505afa158015611094573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110bc91908101906114f3565b6040516020016110cc919061122d565b604051602081830303815290604052805190602001208152602001838152506040516020016110fb91906115a0565b60408051808303601f1901815290829052600354635d8e047f60e11b83529092506201000090046001600160a01b03169063bb1c08fe90349061114b90879086908b908b906001906004016115ff565b6000604051808303818588803b15801561116457600080fd5b505af1158015611178573d6000803e3d6000fd5b5050604080516001600160a01b038a168152602081018890529081018690527faa2518531d4a3c1141a39bf32c0ca65da60f908bdd41973506b1fbc149430b03935060600191506111c69050565b60405180910390a15050505050565b60005b838110156111f05781810151838201526020016111d8565b838111156109e75750506000910152565b600081518084526112198160208601602086016111d5565b601f01601f19169290920160200192915050565b6020815260006112406020830184611201565b9392505050565b80356001600160a01b038116811461125e57600080fd5b919050565b6000806040838503121561127657600080fd5b61127f83611247565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60008082840360c08112156112b757600080fd5b60a08112156112c557600080fd5b5060405160a0810181811067ffffffffffffffff821117156112e9576112e961128d565b6040528335815260208401356008811061130257600080fd5b602082015261131360408501611247565b604082015260608481013590820152608080850135908201529460a09093013593505050565b60008060006060848603121561134e57600080fd5b61135784611247565b925061136560208501611247565b9150604084013590509250925092565b60006020828403121561138757600080fd5b5035919050565b6000602082840312156113a057600080fd5b61124082611247565b8035801515811461125e57600080fd5b600080604083850312156113cc57600080fd5b6113d583611247565b91506113e3602084016113a9565b90509250929050565b6000806000806080858703121561140257600080fd5b61140b85611247565b935061141960208601611247565b93969395505050506040820135916060013590565b6000806040838503121561144157600080fd5b61144a83611247565b91506113e360208401611247565b60006020828403121561146a57600080fd5b611240826113a9565b600181811c9082168061148757607f821691505b602082108114156114a857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156114d7576114d76114ae565b500190565b6000828210156114ee576114ee6114ae565b500390565b60006020828403121561150557600080fd5b815167ffffffffffffffff8082111561151d57600080fd5b818401915084601f83011261153157600080fd5b8151818111156115435761154361128d565b604051601f8201601f19908116603f0116810190838211818310171561156b5761156b61128d565b8160405282815287602084870101111561158457600080fd5b6115958360208301602088016111d5565b979650505050505050565b81518152602082015160a0820190600881106115cc57634e487b7160e01b600052602160045260246000fd5b60208301526040838101516001600160a01b03169083015260608084015190830152608092830151929091019190915290565b85815260a06020820152600061161860a0830187611201565b6001600160a01b039586166040840152939094166060820152901515608090910152939250505056fea26469706673582212206a217184f56ddbb4c23b610e4c1a675433967d75826527098e9cf05fad2c23b664736f6c63430008090033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000a5072696d6520707573640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047075736400000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106101435760003560e01c806365f32edd116100b0578063a457c2d71161006c578063a457c2d7146103d9578063a9059cbb146103f9578063cb9520e214610419578063dd62ed3e1461042c578063f187892214610472578063f851a4401461049257005b806365f32edd146102f657806370a08231146103165780637158da7c1461034c57806379cc6790146103845780638f283970146103a457806395d89b41146103c457005b8063313ce567116100ff578063313ce5671461021c578063395093511461024657806340c10f191461026657806342966c681461028657806344ac5027146102a657806350dcef50146102c657005b806306fdde031461014c578063095ea7b31461017757806316c9e965146101a757806318160ddd146101c757806318e34399146101e657806323b872dd146101fc57005b3661014a57005b005b34801561015857600080fd5b506101616104b2565b60405161016e919061122d565b60405180910390f35b34801561018357600080fd5b50610197610192366004611263565b610544565b604051901515815260200161016e565b3480156101b357600080fd5b5061014a6101c23660046112a3565b61055c565b3480156101d357600080fd5b506007545b60405190815260200161016e565b3480156101f257600080fd5b506101d860025481565b34801561020857600080fd5b50610197610217366004611339565b6105f9565b34801561022857600080fd5b50600354610100900460ff1660405160ff909116815260200161016e565b34801561025257600080fd5b50610197610261366004611263565b61061d565b34801561027257600080fd5b5061014a610281366004611263565b61065c565b34801561029257600080fd5b5061014a6102a1366004611375565b6106b8565b3480156102b257600080fd5b5061014a6102c136600461138e565b6106c5565b3480156102d257600080fd5b506101976102e136600461138e565b60046020526000908152604090205460ff1681565b34801561030257600080fd5b5061014a6103113660046113b9565b61078e565b34801561032257600080fd5b506101d861033136600461138e565b6001600160a01b031660009081526005602052604090205490565b34801561035857600080fd5b5060015461036c906001600160a01b031681565b6040516001600160a01b03909116815260200161016e565b34801561039057600080fd5b5061014a61039f366004611263565b610815565b3480156103b057600080fd5b5061014a6103bf36600461138e565b61082a565b3480156103d057600080fd5b506101616108e5565b3480156103e557600080fd5b506101976103f4366004611263565b6108f4565b34801561040557600080fd5b50610197610414366004611263565b61098b565b61014a6104273660046113ec565b610999565b34801561043857600080fd5b506101d861044736600461142e565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b34801561047e57600080fd5b5061014a61048d366004611458565b6109ed565b34801561049e57600080fd5b5060005461036c906001600160a01b031681565b6060600880546104c190611473565b80601f01602080910402602001604051908101604052809291908181526020018280546104ed90611473565b801561053a5780601f1061050f5761010080835404028352916020019161053a565b820191906000526020600020905b81548152906001019060200180831161051d57829003601f168201915b5050505050905090565b600033610552818585610a6e565b5060019392505050565b6003546201000090046001600160a01b0316331461058d5760405163275e4def60e01b815260040160405180910390fd5b61059f82604001518360800151610b93565b604080830151608084015182516001600160a01b03909216825260208201849052918101919091527fe2b5ff2eca7b4593a96d009a8c6516686771f4c32523493acb9cc2ac69b5b809906060015b60405180910390a15050565b600033610607858285610c72565b610612858585610cfe565b506001949350505050565b3360008181526006602090815260408083206001600160a01b038716845290915281205490919061055290829086906106579087906114c4565b610a6e565b3360009081526004602052604090205460ff1661068c5760405163eb1d984360e01b815260040160405180910390fd5b806106aa57604051635517a95560e11b815260040160405180910390fd5b6106b48282610b93565b5050565b6106c23382610ecc565b50565b6000546001600160a01b031633146106f057604051634755657960e01b815260040160405180910390fd5b6001600160a01b03811661071757604051635f3ee81760e01b815260040160405180910390fd5b600354604080516001600160a01b03620100009093048316815291831660208301527f5bf96fd739fbcbe90a13fe959204e05f9de23508ccd4193c378db1a6c02329dd910160405180910390a1600380546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b6000546001600160a01b031633146107b957604051634755657960e01b815260040160405180910390fd5b6001600160a01b038216600081815260046020908152604091829020805460ff19168515159081179091558251938452908301527f55bbb2f70b2c0c05e848afef6c2df1d6e2ecbc7913a53898298e136d64a21aa391016105ed565b610820823383610c72565b6106b48282610ecc565b6000546001600160a01b0316331461085557604051634755657960e01b815260040160405180910390fd5b6001600160a01b03811661087c57604051635f3ee81760e01b815260040160405180910390fd5b600054604080516001600160a01b03928316815291831660208301527fcf9b665e0639e0b81a8db37b60ac7ddf45aeb1b484e11adeb7dff4bf4a3a6258910160405180910390a1600080546001600160a01b0319166001600160a01b0392909216919091179055565b6060600980546104c190611473565b3360008181526006602090815260408083206001600160a01b03871684529091528120549091908381101561097e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6106128286868403610a6e565b600033610552818585610cfe565b60035460ff16156109bd5760405163cd1fda9f60e01b815260040160405180910390fd5b806109db576040516301bdc2ad60e21b815260040160405180910390fd5b6109e784848484611012565b50505050565b6000546001600160a01b03163314610a1857604051634755657960e01b815260040160405180910390fd5b6003546040805160ff9092161515825282151560208301527fc043f4e3ac3241bbac51f8b5ac104d9aac3ea4d455b3c8050f080a4dd6a81273910160405180910390a16003805460ff1916911515919091179055565b6001600160a01b038316610ad05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610975565b6001600160a01b038216610b315760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610975565b6001600160a01b0383811660008181526006602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038216610be95760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610975565b8060076000828254610bfb91906114c4565b90915550506001600160a01b03821660009081526005602052604081208054839290610c289084906114c4565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0383811660009081526006602090815260408083209386168352929052205460001981146109e75781811015610cf15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610975565b6109e78484848403610a6e565b6001600160a01b038316610d625760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610975565b6001600160a01b038216610dc45760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610975565b6001600160a01b03831660009081526005602052604090205481811015610e3c5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610975565b6001600160a01b03808516600090815260056020526040808220858503905591851681529081208054849290610e739084906114c4565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610ebf91815260200190565b60405180910390a36109e7565b6001600160a01b038216610f2c5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610975565b6001600160a01b03821660009081526005602052604090205481811015610fa05760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610975565b6001600160a01b0383166000908152600560205260408120838303905560078054849290610fcf9084906114dc565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610b86565b61101c3382610ecc565b6040805160a081019091526000808252906020810160078152602001866001600160a01b03168152602001306001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b15801561108057600080fd5b505afa158015611094573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110bc91908101906114f3565b6040516020016110cc919061122d565b604051602081830303815290604052805190602001208152602001838152506040516020016110fb91906115a0565b60408051808303601f1901815290829052600354635d8e047f60e11b83529092506201000090046001600160a01b03169063bb1c08fe90349061114b90879086908b908b906001906004016115ff565b6000604051808303818588803b15801561116457600080fd5b505af1158015611178573d6000803e3d6000fd5b5050604080516001600160a01b038a168152602081018890529081018690527faa2518531d4a3c1141a39bf32c0ca65da60f908bdd41973506b1fbc149430b03935060600191506111c69050565b60405180910390a15050505050565b60005b838110156111f05781810151838201526020016111d8565b838111156109e75750506000910152565b600081518084526112198160208601602086016111d5565b601f01601f19169290920160200192915050565b6020815260006112406020830184611201565b9392505050565b80356001600160a01b038116811461125e57600080fd5b919050565b6000806040838503121561127657600080fd5b61127f83611247565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60008082840360c08112156112b757600080fd5b60a08112156112c557600080fd5b5060405160a0810181811067ffffffffffffffff821117156112e9576112e961128d565b6040528335815260208401356008811061130257600080fd5b602082015261131360408501611247565b604082015260608481013590820152608080850135908201529460a09093013593505050565b60008060006060848603121561134e57600080fd5b61135784611247565b925061136560208501611247565b9150604084013590509250925092565b60006020828403121561138757600080fd5b5035919050565b6000602082840312156113a057600080fd5b61124082611247565b8035801515811461125e57600080fd5b600080604083850312156113cc57600080fd5b6113d583611247565b91506113e3602084016113a9565b90509250929050565b6000806000806080858703121561140257600080fd5b61140b85611247565b935061141960208601611247565b93969395505050506040820135916060013590565b6000806040838503121561144157600080fd5b61144a83611247565b91506113e360208401611247565b60006020828403121561146a57600080fd5b611240826113a9565b600181811c9082168061148757607f821691505b602082108114156114a857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156114d7576114d76114ae565b500190565b6000828210156114ee576114ee6114ae565b500390565b60006020828403121561150557600080fd5b815167ffffffffffffffff8082111561151d57600080fd5b818401915084601f83011261153157600080fd5b8151818111156115435761154361128d565b604051601f8201601f19908116603f0116810190838211818310171561156b5761156b61128d565b8160405282815287602084870101111561158457600080fd5b6115958360208301602088016111d5565b979650505050505050565b81518152602082015160a0820190600881106115cc57634e487b7160e01b600052602160045260246000fd5b60208301526040838101516001600160a01b03169083015260608084015190830152608092830151929091019190915290565b85815260a06020820152600061161860a0830187611201565b6001600160a01b039586166040840152939094166060820152901515608090910152939250505056fea26469706673582212206a217184f56ddbb4c23b610e4c1a675433967d75826527098e9cf05fad2c23b664736f6c63430008090033
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.