Overview
Max Total Supply
3,702.892831534101088637 yETH
Holders
48 (0.00%)
Total Transfers
-
Market
Price
$3,267.44 @ 1.000011 ETH (-4.54%)
Onchain Market Cap
$12,098,980.15
Circulating Supply Market Cap
$0.00
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
yETH token
Compiler Version
vyper:0.3.7
Contract Source Code (Vyper language format)
# @version 0.3.7 """ @title yETH token @author 0xkorin, Yearn Finance @license Copyright (c) Yearn Finance, 2023 - all rights reserved """ from vyper.interfaces import ERC20 implements: ERC20 totalSupply: public(uint256) balanceOf: public(HashMap[address, uint256]) allowance: public(HashMap[address, HashMap[address, uint256]]) name: public(constant(String[11])) = "Yearn Ether" symbol: public(constant(String[4])) = "yETH" decimals: public(constant(uint8)) = 18 minters: public(HashMap[address, bool]) management: public(address) event Transfer: sender: indexed(address) receiver: indexed(address) value: uint256 event Approval: owner: indexed(address) spender: indexed(address) value: uint256 event SetManagement: account: indexed(address) event SetMinter: account: indexed(address) minter: bool @external def __init__(): self.management = msg.sender log Transfer(empty(address), msg.sender, 0) @external def transfer(_to: address, _value: uint256) -> bool: """ @notice Transfers `_value` tokens from the caller's address to `_to` @param _to The address shares are being transferred to. Must not be this contract's address, must not be 0x0 @param _value The quantity of tokens to transfer @return True """ assert _to != empty(address) and _to != self self.balanceOf[msg.sender] -= _value self.balanceOf[_to] += _value log Transfer(msg.sender, _to, _value) return True @external def transferFrom(_from: address, _to: address, _value: uint256) -> bool: """ @notice Transfers `_value` tokens from `_from` to `_to`. Transfering tokens will decrement the caller's `allowance` by `_value` @param _from The address tokens are being transferred from @param _to The address tokens are being transferred to. Must not be this contract's address, must not be 0x0 @param _value The quantity of tokens to transfer @return True """ assert _to != empty(address) and _to != self self.allowance[_from][msg.sender] -= _value self.balanceOf[_from] -= _value self.balanceOf[_to] += _value log Transfer(_from, _to, _value) return True @external def approve(_spender: address, _value: uint256) -> bool: """ @notice Approve the passed address to spend the specified amount of tokens on behalf of `msg.sender`. 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. See https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 @param _spender The address which will spend the funds @param _value The amount of tokens to be spent @return True """ assert _spender != empty(address) self.allowance[msg.sender][_spender] = _value log Approval(msg.sender, _spender, _value) return True @external def increaseAllowance(_spender: address, _value: uint256) -> bool: """ @notice Increase the allowance of the passed address to spend the total amount of tokens on behalf of `msg.sender`. This method mitigates the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. See https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 @param _spender The address which will spend the funds @param _value The amount of tokens to increase the allowance by @return True """ assert _spender != empty(address) allowance: uint256 = self.allowance[msg.sender][_spender] + _value self.allowance[msg.sender][_spender] = allowance log Approval(msg.sender, _spender, allowance) return True @external def decreaseAllowance(_spender: address, _value: uint256) -> bool: """ @notice Decrease the allowance of the passed address to spend the total amount of tokens on behalf of `msg.sender`. This method mitigates the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. See https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 @param _spender The address which will spend the funds @param _value The amount of tokens to decrease the allowance by @return True """ assert _spender != empty(address) allowance: uint256 = self.allowance[msg.sender][_spender] if _value > allowance: allowance = 0 else: allowance -= _value self.allowance[msg.sender][_spender] = allowance log Approval(msg.sender, _spender, allowance) return True @external def set_management(_management: address): """ @notice Set new management address """ assert msg.sender == self.management self.management = _management log SetManagement(_management) @external def set_minter(_account: address, _minter: bool = True): """ @notice Grant or revoke mint and burn powers to an account @param _account The account to change mint/burn powers of @param _minter Flag whether or not to allow minting/burning """ assert msg.sender == self.management self.minters[_account] = _minter log SetMinter(_account, _minter) @external def mint(_account: address, _value: uint256): """ @notice Mint `_value` tokens to `_account` @param _account The account to mint tokens to @param _value Amount of tokens to mint """ assert self.minters[msg.sender] self.totalSupply += _value self.balanceOf[_account] += _value log Transfer(empty(address), _account, _value) @external def burn(_account: address, _value: uint256): """ @notice Burn `_value` tokens from `_account` @param _account The account to burn tokens from @param _value Amount of tokens to burn """ assert self.minters[msg.sender] self.totalSupply -= _value self.balanceOf[_account] -= _value log Transfer(_account, empty(address), _value)
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"name":"Transfer","inputs":[{"name":"sender","type":"address","indexed":true},{"name":"receiver","type":"address","indexed":true},{"name":"value","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true},{"name":"spender","type":"address","indexed":true},{"name":"value","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"SetManagement","inputs":[{"name":"account","type":"address","indexed":true}],"anonymous":false,"type":"event"},{"name":"SetMinter","inputs":[{"name":"account","type":"address","indexed":true},{"name":"minter","type":"bool","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"transfer","inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"transferFrom","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"approve","inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"increaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"decreaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"set_management","inputs":[{"name":"_management","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_minter","inputs":[{"name":"_account","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_minter","inputs":[{"name":"_account","type":"address"},{"name":"_minter","type":"bool"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"mint","inputs":[{"name":"_account","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"burn","inputs":[{"name":"_account","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"allowance","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}]},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}]},{"stateMutability":"view","type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint8"}]},{"stateMutability":"view","type":"function","name":"minters","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"view","type":"function","name":"management","inputs":[],"outputs":[{"name":"","type":"address"}]}]
Contract Creation Code
346108d857336004553360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600060405260206040a361088f6100486100003961088f610000f36003361161000c57610877565b60003560e01c3461087d5763a9059cbb81186100d8576044361061087d576004358060a01c61087d576040526040511561004b5730604051141561004e565b60005b1561087d576001336020526000526040600020805460243580820382811161087d579050905081555060016040516020526000526040600020805460243580820182811061087d5790509050815550604051337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60243560605260206060a3600160605260206060f35b6323b872dd81186101e0576064361061087d576004358060a01c61087d576040526024358060a01c61087d576060526060511561011a5730606051141561011d565b60005b1561087d5760026040516020526000526040600020803360205260005260406000209050805460443580820382811161087d579050905081555060016040516020526000526040600020805460443580820382811161087d579050905081555060016060516020526000526040600020805460443580820182811061087d57905090508155506060516040517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60443560805260206080a3600160805260206080f35b63095ea7b38118610267576044361061087d576004358060a01c61087d576040526040511561087d576024356002336020526000526040600020806040516020526000526040600020905055604051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560243560605260206060a3600160605260206060f35b63395093518118610322576044361061087d576004358060a01c61087d576040526040511561087d57600233602052600052604060002080604051602052600052604060002090505460243580820182811061087d57905090506060526060516002336020526000526040600020806040516020526000526040600020905055604051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560605160805260206080a3600160805260206080f35b63a457c2d781186103f9576044361061087d576004358060a01c61087d576040526040511561087d576002336020526000526040600020806040516020526000526040600020905054606052606051602435116103955760605160243580820382811161087d579050905060605261039b565b60006060525b6060516002336020526000526040600020806040516020526000526040600020905055604051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560605160805260206080a3600160805260206080f35b63fd066ecc8118610454576024361061087d576004358060a01c61087d57604052600454331861087d576040516004556040517fafe23f9e1f603b288748a507d5a993957e9f14313a5889d5a070851299939d5960006060a2005b631652e9fc8118610471576024361061087d576001606052610493565b637c3bec3c81186104ef576044361061087d576024358060011c61087d576060525b6004358060a01c61087d57604052600454331861087d5760605160036040516020526000526040600020556040517f1f96bc657d385fd83da973a43f2ad969e6d96b6779b779571a7306db7ca1cd0060605160805260206080a2005b6340c10f198118610594576044361061087d576004358060a01c61087d576040526003336020526000526040600020541561087d5760005460243580820182811061087d579050905060005560016040516020526000526040600020805460243580820182811061087d579050905081555060405160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60243560605260206060a3005b639dc29fac8118610639576044361061087d576004358060a01c61087d576040526003336020526000526040600020541561087d5760005460243580820382811161087d579050905060005560016040516020526000526040600020805460243580820382811161087d579050905081555060006040517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60243560605260206060a3005b6318160ddd8118610658576004361061087d5760005460405260206040f35b6370a082318118610693576024361061087d576004358060a01c61087d57604052600160405160205260005260406000205460605260206060f35b63dd62ed3e81186106ed576044361061087d576004358060a01c61087d576040526024358060a01c61087d576060526002604051602052600052604060002080606051602052600052604060002090505460805260206080f35b6306fdde038118610775576004361061087d57602080608052600b6040527f596561726e20457468657200000000000000000000000000000000000000000060605260408160800181518082526020830160208301815181525050508051806020830101601f82600003163682375050601f19601f8251602001011690509050810190506080f35b6395d89b4181186107fd576004361061087d5760208060805260046040527f794554480000000000000000000000000000000000000000000000000000000060605260408160800181518082526020830160208301815181525050508051806020830101601f82600003163682375050601f19601f8251602001011690509050810190506080f35b63313ce567811861081b576004361061087d57601260405260206040f35b63f46eccc48118610856576024361061087d576004358060a01c61087d57604052600360405160205260005260406000205460605260206060f35b6388a8d6028118610875576004361061087d5760045460405260206040f35b505b60006000fd5b600080fda165767970657283000307000b005b600080fd
Deployed Bytecode
0x6003361161000c57610877565b60003560e01c3461087d5763a9059cbb81186100d8576044361061087d576004358060a01c61087d576040526040511561004b5730604051141561004e565b60005b1561087d576001336020526000526040600020805460243580820382811161087d579050905081555060016040516020526000526040600020805460243580820182811061087d5790509050815550604051337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60243560605260206060a3600160605260206060f35b6323b872dd81186101e0576064361061087d576004358060a01c61087d576040526024358060a01c61087d576060526060511561011a5730606051141561011d565b60005b1561087d5760026040516020526000526040600020803360205260005260406000209050805460443580820382811161087d579050905081555060016040516020526000526040600020805460443580820382811161087d579050905081555060016060516020526000526040600020805460443580820182811061087d57905090508155506060516040517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60443560805260206080a3600160805260206080f35b63095ea7b38118610267576044361061087d576004358060a01c61087d576040526040511561087d576024356002336020526000526040600020806040516020526000526040600020905055604051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560243560605260206060a3600160605260206060f35b63395093518118610322576044361061087d576004358060a01c61087d576040526040511561087d57600233602052600052604060002080604051602052600052604060002090505460243580820182811061087d57905090506060526060516002336020526000526040600020806040516020526000526040600020905055604051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560605160805260206080a3600160805260206080f35b63a457c2d781186103f9576044361061087d576004358060a01c61087d576040526040511561087d576002336020526000526040600020806040516020526000526040600020905054606052606051602435116103955760605160243580820382811161087d579050905060605261039b565b60006060525b6060516002336020526000526040600020806040516020526000526040600020905055604051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560605160805260206080a3600160805260206080f35b63fd066ecc8118610454576024361061087d576004358060a01c61087d57604052600454331861087d576040516004556040517fafe23f9e1f603b288748a507d5a993957e9f14313a5889d5a070851299939d5960006060a2005b631652e9fc8118610471576024361061087d576001606052610493565b637c3bec3c81186104ef576044361061087d576024358060011c61087d576060525b6004358060a01c61087d57604052600454331861087d5760605160036040516020526000526040600020556040517f1f96bc657d385fd83da973a43f2ad969e6d96b6779b779571a7306db7ca1cd0060605160805260206080a2005b6340c10f198118610594576044361061087d576004358060a01c61087d576040526003336020526000526040600020541561087d5760005460243580820182811061087d579050905060005560016040516020526000526040600020805460243580820182811061087d579050905081555060405160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60243560605260206060a3005b639dc29fac8118610639576044361061087d576004358060a01c61087d576040526003336020526000526040600020541561087d5760005460243580820382811161087d579050905060005560016040516020526000526040600020805460243580820382811161087d579050905081555060006040517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60243560605260206060a3005b6318160ddd8118610658576004361061087d5760005460405260206040f35b6370a082318118610693576024361061087d576004358060a01c61087d57604052600160405160205260005260406000205460605260206060f35b63dd62ed3e81186106ed576044361061087d576004358060a01c61087d576040526024358060a01c61087d576060526002604051602052600052604060002080606051602052600052604060002090505460805260206080f35b6306fdde038118610775576004361061087d57602080608052600b6040527f596561726e20457468657200000000000000000000000000000000000000000060605260408160800181518082526020830160208301815181525050508051806020830101601f82600003163682375050601f19601f8251602001011690509050810190506080f35b6395d89b4181186107fd576004361061087d5760208060805260046040527f794554480000000000000000000000000000000000000000000000000000000060605260408160800181518082526020830160208301815181525050508051806020830101601f82600003163682375050601f19601f8251602001011690509050810190506080f35b63313ce567811861081b576004361061087d57601260405260206040f35b63f46eccc48118610856576024361061087d576004358060a01c61087d57604052600360405160205260005260406000205460605260206060f35b6388a8d6028118610875576004361061087d5760045460405260206040f35b505b60006000fd5b600080fda165767970657283000307000b
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.