Contract
0x64de4bc49dba9990a16fc6f8c4e23cb01a086ede
1
Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Latest 1 internal transaction
Parent Txn Hash | Block | From | To | Value | |||
---|---|---|---|---|---|---|---|
0xb5d506f2fbea907f7c1474719934b113bbb12c386cab20e007f5e6c16fdf7d0c | 55122812 | 113 days 16 hrs ago | 0x9e462d5603bb983b74e941ebd5ce9ea76f3a9e1e | Contract Creation | 0 FTM |
[ Download CSV Export ]
Minimal Proxy Contract for 0x7dc8fbd9be15c5a0217bc8272aab6309938e2dff
Similar Match Source Code (Similar Match)
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x299237c947CE36aAC8f1226bEA4d050785e68fB5
Contract Name:
Vyper_contract
Compiler Version
vyper:0.2.16
Contract Source Code (Vyper language format)
# @version 0.2.16 """ @title Simple Vesting Escrow @author Curve Finance, Yearn Finance @license MIT @notice Vests ERC20 tokens for a single address @dev Intended to be deployed many times via `VotingEscrowFactory` """ from vyper.interfaces import ERC20 event Fund: recipient: indexed(address) amount: uint256 event Claim: recipient: indexed(address) claimed: uint256 event CommitOwnership: admin: address event ApplyOwnership: admin: address recipient: public(address) token: public(ERC20) start_time: public(uint256) end_time: public(uint256) cliff_length: public(uint256) total_locked: public(uint256) total_claimed: public(uint256) disabled_at: public(uint256) initialized: public(bool) admin: public(address) future_admin: public(address) @external def __init__(): # ensure that the original contract cannot be initialized self.initialized = True @external @nonreentrant('lock') def initialize( admin: address, token: address, recipient: address, amount: uint256, start_time: uint256, end_time: uint256, cliff_length: uint256, ) -> bool: """ @notice Initialize the contract. @dev This function is seperate from `__init__` because of the factory pattern used in `VestingEscrowFactory.deploy_vesting_contract`. It may be called once per deployment. @param admin Admin address @param token Address of the ERC20 token being distributed @param recipient Address to vest tokens for @param amount Amount of tokens being vested for `recipient` @param start_time Epoch time at which token distribution starts @param end_time Time until everything should be vested @param cliff_length Duration after which the first portion vests """ assert not self.initialized # dev: can only initialize once self.initialized = True self.token = ERC20(token) self.admin = admin self.start_time = start_time self.end_time = end_time self.cliff_length = cliff_length assert self.token.transferFrom(msg.sender, self, amount) # dev: could not fund escrow self.recipient = recipient self.disabled_at = end_time # Set to maximum time self.total_locked = amount log Fund(recipient, amount) return True @internal @view def _total_vested_at(time: uint256 = block.timestamp) -> uint256: start: uint256 = self.start_time end: uint256 = self.end_time locked: uint256 = self.total_locked if time < start + self.cliff_length: return 0 return min(locked * (time - start) / (end - start), locked) @internal @view def _unclaimed(time: uint256 = block.timestamp) -> uint256: return self._total_vested_at(time) - self.total_claimed @external @view def unclaimed() -> uint256: """ @notice Get the number of unclaimed, vested tokens for recipient """ # NOTE: if `rug_pull` is activated, limit by the activation timestamp return self._unclaimed(min(block.timestamp, self.disabled_at)) @internal @view def _locked(time: uint256 = block.timestamp) -> uint256: return self.total_locked - self._total_vested_at(time) @external @view def locked() -> uint256: """ @notice Get the number of locked tokens for recipient """ # NOTE: if `rug_pull` is activated, limit by the activation timestamp return self._locked(min(block.timestamp, self.disabled_at)) @external def claim(beneficiary: address = msg.sender, amount: uint256 = MAX_UINT256): """ @notice Claim tokens which have vested @param beneficiary Address to transfer claimed tokens to @param amount Amount of tokens to claim """ assert msg.sender == self.recipient # dev: not recipient claim_period_end: uint256 = min(block.timestamp, self.disabled_at) claimable: uint256 = min(self._unclaimed(claim_period_end), amount) self.total_claimed += claimable assert self.token.transfer(beneficiary, claimable) log Claim(beneficiary, claimable) @external def commit_transfer_ownership(addr: address): """ @notice Transfer ownership of the contract to `addr` @param addr Address to have ownership transferred to """ assert msg.sender == self.admin # dev: admin only self.future_admin = addr log CommitOwnership(addr) @external def apply_transfer_ownership(): """ @notice Apply pending ownership transfer """ assert msg.sender == self.future_admin # dev: future admin only self.admin = msg.sender self.future_admin = ZERO_ADDRESS log ApplyOwnership(msg.sender) @external def renounce_ownership(): """ @notice Renounce admin control of the escrow """ assert msg.sender == self.admin # dev: admin only self.future_admin = ZERO_ADDRESS self.admin = ZERO_ADDRESS log ApplyOwnership(ZERO_ADDRESS) @external def collect_dust(token: address): assert msg.sender == self.recipient # dev: recipient only assert (token != self.token.address or block.timestamp > self.disabled_at) assert ERC20(token).transfer(self.recipient, ERC20(token).balanceOf(self))
[{"name":"Fund","inputs":[{"name":"recipient","type":"address","indexed":true},{"name":"amount","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"Claim","inputs":[{"name":"recipient","type":"address","indexed":true},{"name":"claimed","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"CommitOwnership","inputs":[{"name":"admin","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"ApplyOwnership","inputs":[{"name":"admin","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"initialize","inputs":[{"name":"admin","type":"address"},{"name":"token","type":"address"},{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"},{"name":"start_time","type":"uint256"},{"name":"end_time","type":"uint256"},{"name":"cliff_length","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":402331},{"stateMutability":"view","type":"function","name":"unclaimed","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":26060},{"stateMutability":"view","type":"function","name":"locked","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":26120},{"stateMutability":"nonpayable","type":"function","name":"claim","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"claim","inputs":[{"name":"beneficiary","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"claim","inputs":[{"name":"beneficiary","type":"address"},{"name":"amount","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"addr","type":"address"}],"outputs":[],"gas":39565},{"stateMutability":"nonpayable","type":"function","name":"apply_transfer_ownership","inputs":[],"outputs":[],"gas":59493},{"stateMutability":"nonpayable","type":"function","name":"renounce_ownership","inputs":[],"outputs":[],"gas":44525},{"stateMutability":"nonpayable","type":"function","name":"collect_dust","inputs":[{"name":"token","type":"address"}],"outputs":[],"gas":14090},{"stateMutability":"view","type":"function","name":"recipient","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2628},{"stateMutability":"view","type":"function","name":"token","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2658},{"stateMutability":"view","type":"function","name":"start_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2688},{"stateMutability":"view","type":"function","name":"end_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2718},{"stateMutability":"view","type":"function","name":"cliff_length","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2748},{"stateMutability":"view","type":"function","name":"total_locked","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2778},{"stateMutability":"view","type":"function","name":"total_claimed","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2808},{"stateMutability":"view","type":"function","name":"disabled_at","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2838},{"stateMutability":"view","type":"function","name":"initialized","inputs":[],"outputs":[{"name":"","type":"bool"}],"gas":2868},{"stateMutability":"view","type":"function","name":"admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2898},{"stateMutability":"view","type":"function","name":"future_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2928}]
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Validator ID :
0 FTM
Amount Staked
0
Amount Delegated
0
Staking Total
0
Staking Start Epoch
0
Staking Start Time
0
Proof of Importance
0
Origination Score
0
Validation Score
0
Active
0
Online
0
Downtime
0 s
Address | Amount | claimed Rewards | Created On Epoch | Created On |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.