Address Contract Partially Verified
Address
0xFCc5c47bE19d06BF83eB04298b026F81069ff65b
Balance
0 ETH
Nonce
1
Code Size
2729 bytes
Creator
0x0B634A8D...d26b at tx 0x267e273f...1088ec
Indexed Transactions
0
Contract Bytecode
2729 bytes
0x6003361161000c57610a21565b60003560e01c34610a975763a9059cbb81186100bd5760443610610a97576004358060a01c610a975760405260053360205260005260406000208054602435808203828111610a975790509050815550600560405160205260005260406000208054602435808201828110610a975790509050815550604051337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60243560605260206060a3600160605260206060f35b6323b872dd81186101aa5760643610610a97576004358060a01c610a97576040526024358060a01c610a9757606052600560405160205260005260406000208054604435808203828111610a975790509050815550600560605160205260005260406000208054604435808201828110610a975790509050815550600660405160205260005260406000208033602052600052604060002090508054604435808203828111610a9757905090508155506060516040517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60443560805260206080a3600160805260206080f35b63095ea7b381186102295760443610610a97576004358060a01c610a97576040526024356006336020526000526040600020806040516020526000526040600020905055604051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560243560605260206060a3600160605260206060f35b631249c58b81186102695760043610610a97577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60a0523360c0526102b3565b63a0712d68811861028b5760243610610a975760043560a0523360c0526102b3565b6394bf804d81186104025760443610610a975760043560a0526024358060a01c610a975760c0525b60c0513081146102c5578015156102c8565b60005b905015610a975760a05160e05260e0511961032b576370a082316101005233610120526020610100602461011c73d533a949740bb3306d119cc777fa900ba034cd525afa61031b573d600060003e3d6000fd5b60203d10610a97576101005160e0525b60e05115610a97576323b872dd61010052336101205273f147b8125d2ef93fb6965db97d6746952a1339346101405260e051610160526020610100606461011c600073d533a949740bb3306d119cc777fa900ba034cd525af1610393573d600060003e3d6000fd5b60203d10610a9757610100518060011c610a9757610180526101805115610a975760c05160405260e0516060526103c8610a27565b600060c051337f6e68020828492dc2cff67ca17a03bb572aae3d0c743a404696b93bc16c0a1a2a60e051610100526020610100a4602060e0f35b635ff2a15f81186104425760043610610a97577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60a0523360c05261048c565b63dddb637f81186104645760243610610a975760043560a0523360c05261048c565b63795c252181186105de5760443610610a975760043560a0526024358060a01c610a975760c0525b60c05130811461049e578015156104a1565b60005b905015610a975760a05160e05260e05119610504576370a082316101005233610120526020610100602461011c73c5bddf9843308380375a611c18b50fb9341f502a5afa6104f4573d600060003e3d6000fd5b60203d10610a97576101005160e0525b60e05115610a97576323b872dd610100523361012052306101405260e051610160526020610100606461011c600073c5bddf9843308380375a611c18b50fb9341f502a5af1610558573d600060003e3d6000fd5b60203d10610a9757610100518060011c610a9757610180526101805115610a975760085460e051808201828110610a97579050905060085560c05160405260e0516060526105a4610a27565b600160c051337f6e68020828492dc2cff67ca17a03bb572aae3d0c743a404696b93bc16c0a1a2a60e051610100526020610100a4602060e0f35b63304ad66281186106395760243610610a97576004358060a01c610a97576040526009543318610a97576040516009556040517f9e3ed1b4f392c7b0c322e2f6fd1bc5889ab0a01ca356a09f62332acea07beca160006060a2005b6301681a6281186106755760243610610a97577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60605261068f565b636ea056a981186107825760443610610a97576024356060525b6004358060a01c610a97576040526009543318610a975773c5bddf9843308380375a611c18b50fb9341f502a60405114610a97576060516080526080511961070b576040516370a0823160a0523060c052602060a0602460bc845afa6106fa573d600060003e3d6000fd5b60203d10610a975760a09050516080525b60805115610a975760405163a9059cbb60a05260095460c05260805160e052602060a0604460bc6000855af1610746573d600060003e3d6000fd5b3d61075d57803b15610a9757600161010052610775565b60203d10610a975760a0518060011c610a9757610100525b61010090505115610a9757005b6318880ddd811861085e5760043610610a97576009543318610a97576370a0823160605230608052602060606024607c73c5bddf9843308380375a611c18b50fb9341f502a5afa6107d8573d600060003e3d6000fd5b60203d10610a9757606051600854808203828111610a97579050905060405260405115610a975763a9059cbb60605260095460805260405160a052602060606044607c600073c5bddf9843308380375a611c18b50fb9341f502a5af1610843573d600060003e3d6000fd5b60203d10610a97576060518060011c610a975760c05260c050005b6306fdde0381186108b65760043610610a97576020806040528060400160005480825260208201600154815250508051806020830101601f82600003163682375050601f19601f825160200101169050810190506040f35b6395d89b41811861090e5760043610610a97576020806040528060400160025480825260208201600354815250508051806020830101601f82600003163682375050601f19601f825160200101169050810190506040f35b63313ce567811861092d5760043610610a975760045460405260206040f35b6370a0823181186109685760243610610a97576004358060a01c610a9757604052600560405160205260005260406000205460605260206060f35b63dd62ed3e81186109c25760443610610a97576004358060a01c610a97576040526024358060a01c610a97576060526006604051602052600052604060002080606051602052600052604060002090505460805260206080f35b6318160ddd81186109e15760043610610a975760075460405260206040f35b6373f425618118610a005760043610610a975760085460405260206040f35b63168861678118610a1f5760043610610a975760095460405260206040f35b505b60006000fd5b600754606051808201828110610a975790509050600755600560405160205260005260406000208054606051808201828110610a97579050905081555060405160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60605160805260206080a3565b600080fda165767970657283000307000b
Verified Source Code Partial Match
Compiler: v0.3.7+commit.6020b8bb
Vyper_contract.vy 150 lines
# @version 0.3.7
from vyper.interfaces import ERC20
from vyper.interfaces import ERC20Detailed
implements: ERC20
implements: ERC20Detailed
event Transfer:
sender: indexed(address)
receiver: indexed(address)
value: uint256
event Mint:
minter: indexed(address)
receiver: indexed(address)
burned: indexed(bool)
value: uint256
event Approval:
owner: indexed(address)
spender: indexed(address)
value: uint256
event UpdateSweepRecipient:
sweep_recipient: indexed(address)
YVECRV: constant(address) = 0xc5bDdf9843308380375a611c18B50Fb9341f502A
CRV: constant(address) = 0xD533a949740bb3306d119CC777fa900bA034cd52
VOTER: constant(address) = 0xF147b8125d2ef93FB6965Db97D6746952a133934
name: public(String[32])
symbol: public(String[32])
decimals: public(uint8)
balanceOf: public(HashMap[address, uint256])
allowance: public(HashMap[address, HashMap[address, uint256]])
totalSupply: public(uint256)
burned: public(uint256)
sweep_recipient: public(address)
@external
def __init__():
self.name = "Yearn CRV"
self.symbol = "yCRV"
self.decimals = 18
self.sweep_recipient = 0xFEB4acf3df3cDEA7399794D0869ef76A6EfAff52
@external
def transfer(_to : address, _value : uint256) -> bool:
"""
@dev Transfer token for a specified address
@param _to The address to transfer to.
@param _value The amount to be transferred.
"""
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:
"""
@dev Transfer tokens from one address to another.
@param _from address The address which you want to send tokens from
@param _to address The address which you want to transfer to
@param _value uint256 the amount of tokens to be transferred
"""
self.balanceOf[_from] -= _value
self.balanceOf[_to] += _value
self.allowance[_from][msg.sender] -= _value
log Transfer(_from, _to, _value)
return True
@external
def approve(_spender : address, _value : uint256) -> bool:
"""
@dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
@param _spender The address which will spend the funds.
@param _value The amount of tokens to be spent.
"""
self.allowance[msg.sender][_spender] = _value
log Approval(msg.sender, _spender, _value)
return True
@internal
def _mint(_to: address, _value: uint256):
self.totalSupply += _value
self.balanceOf[_to] += _value
log Transfer(empty(address), _to, _value)
@external
def mint(_amount: uint256 = max_value(uint256), _recipient: address = msg.sender) -> uint256:
"""
@notice Donate any amount of CRV to mint yCRV 1 to 1.
Donations are non-redeemable, and will be locked forever.
@param _amount The desired amount of CRV to burn and yCRV to mint.
@param _recipient The address which minted tokens should be received at.
"""
assert _recipient not in [self, empty(address)]
amount: uint256 = _amount
if amount == max_value(uint256):
amount = ERC20(CRV).balanceOf(msg.sender)
assert amount > 0
assert ERC20(CRV).transferFrom(msg.sender, VOTER, amount) # dev: no allowance
self._mint(_recipient, amount)
log Mint(msg.sender, _recipient, False, amount)
return amount
@external
def burn_to_mint(_amount: uint256 = max_value(uint256), _recipient: address = msg.sender) -> uint256:
"""
@dev burn an amount of yveCRV token and mint yCRV token 1 to 1.
@param _amount The amount of yveCRV to burn and yCRV to mint.
@param _recipient The address which minted tokens should be received at.
"""
assert _recipient not in [self, empty(address)]
amount: uint256 = _amount
if amount == max_value(uint256):
amount = ERC20(YVECRV).balanceOf(msg.sender)
assert amount > 0
assert ERC20(YVECRV).transferFrom(msg.sender, self, amount) # dev: no allowance
self.burned += amount
self._mint(_recipient, amount)
log Mint(msg.sender, _recipient, True, amount)
return amount
@external
def set_sweep_recipient(_proposed_recipient: address):
assert msg.sender == self.sweep_recipient
self.sweep_recipient = _proposed_recipient
log UpdateSweepRecipient(_proposed_recipient)
@external
def sweep(_token: address, _amount: uint256 = max_value(uint256)):
assert msg.sender == self.sweep_recipient
assert _token != YVECRV
amount: uint256 = _amount
if amount == max_value(uint256):
amount = ERC20(_token).balanceOf(self)
assert amount > 0
assert ERC20(_token).transfer(self.sweep_recipient, amount, default_return_value=True)
@external
def sweep_yvecrv():
assert msg.sender == self.sweep_recipient
excess: uint256 = ERC20(YVECRV).balanceOf(self) - self.burned
assert excess > 0
ERC20(YVECRV).transfer(self.sweep_recipient, excess)
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
burned 0x73f42561 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
sweep_recipient 0x16886167 → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 13 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
burn_to_mint 0x5ff2a15f
No parameters
returns: uint256
burn_to_mint 0xdddb637f
uint256 _amount
returns: uint256
burn_to_mint 0x795c2521
uint256 _amount
address _recipient
returns: uint256
mint 0x1249c58b
No parameters
returns: uint256
mint 0xa0712d68
uint256 _amount
returns: uint256
mint 0x94bf804d
uint256 _amount
address _recipient
returns: uint256
set_sweep_recipient 0x304ad662
address _proposed_recipient
sweep 0x01681a62
address _token
sweep 0x6ea056a9
address _token
uint256 _amount
sweep_yvecrv 0x18880ddd
No parameters
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
Recent Transactions
No transactions found for this address