Address Contract Partially Verified
Address
0x5fa57626BDaf4584b84d2394Ef44f6Bd41b37caF
Balance
0 ETH
Nonce
10
Code Size
1407 bytes
Creator
0xf6c61306...2508 at tx 0xbcb7b194...bb7702
Indexed Transactions
0
Contract Bytecode
1407 bytes
0x5f3560e01c6002600a820660011b61052b01601e395f51565b63cc1f2afa8118610523573461052757602061053f60403960206040f3610523565b636a81ec448118610523573461052757602061055f60403960206040f3610523565b63adf8e96381186100775734610527575f5460405260206040f35b63ab5eea5981186105235760a436103417610527576084356080525f60a052600160c0525f60e05233610100526101bf56610523565b63012f52ee81186100de576024361034176105275760043564e8d4a50fff8111610527576001015460405260206040f35b630551ebac81186105235760843610341761052757426080525f60a052600160c0525f60e05233610100526101bf56610523565b63c367cc8081186105235760c4361034176105275760406084608037600160c0525f60e05233610100526101bf56610523565b63e7eba643811861017d5760e436103417610527576040608460803760c4358060011c6105275760c0525f60e05233610100526101bf565b63babce1b981186105235761012436103417610527576040608460803760c4358060011c6105275760c05260e43560e052610104358060a01c61052757610100525b6004358060a01c610527576040526024358060a01c6105275760605260643560a0511161052757426080516064358082018281106105275790509050111561052757606435156105275760605130811461023a57801561023457604051811461022e576101005181141561023c565b5f61023c565b5f61023c565b5f5b905015610527577f602d3d8160093d39f3363d3d373d3d3d363d730000000000000000000000000061014052602061053f5f395f5160601b610153527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006101675260366101405ff0801561052757610120526101205163f586c19f610140526101005161016052604051610180526060516101a0526044356101c0526080516101e05260805160643580820182811061052757905090506102005260a0516102205260c05161024052602061014061010461015c5f855af1610320573d5f5f3e3d5ffd5b60203d1061052757610140518060011c610527576102605261026050506040516323b872dd61014052336101605261012051610180526044356101a0526020610140606461015c5f855af1610377573d5f5f3e3d5ffd5b3d61038e57803b156105275760016101c0526103a7565b60203d1061052757610140518060011c610527576101c0525b6101c0905051156105275760e0511561045d57602061055f5f395f5115610527576040516323b872dd610140523361016052602061055f6101803960443560e0518082028115838383041417156105275790509050612710810490506101a0526020610140606461015c5f855af1610421573d5f5f3e3d5ffd5b3d61043857803b156105275760016101c052610451565b60203d1061052757610140518060011c610527576101c0525b6101c090505115610527575b610120515f5464e8d4a50fff811161052757600101555f54600181018181106105275790505f55606051604051337f99fd02dbc65944923f77d3e5d3e77e8c4c1b4026201be5445a8e827183e993e2610120516101405260443561016052608051610180526064356101a05260a0516101c05260c0516101e05260c0610140a46020610120f3610523565b6373c258a981186105235761010436103417610527576040608460803760c4358060011c6105275760c05260e43560e05233610100526101bf565b5f5ffd5b5f80fd011204e80018005c003a05230523052300ad0145000000000000000000000000f1e70525e994ba73b38b6d6bcfc252b06e1ecade0000000000000000000000009e282c47e7238493735a9264400559bb837bcadc
Verified Source Code Partial Match
Compiler: v0.3.10+commit.91361694
VestingEscrowFactory.vy 123 lines
# @version 0.3.10
"""
@title Vesting Escrow Factory
@author Curve Finance, Yearn Finance
@license MIT
@notice Stores and distributes ERC20 tokens by deploying `VestingEscrowSimple` contracts
"""
from vyper.interfaces import ERC20
interface VestingEscrowSimple:
def initialize(
owner: address,
token: ERC20,
recipient: address,
amount: uint256,
start_time: uint256,
end_time: uint256,
cliff_length: uint256,
open_claim: bool,
) -> bool: nonpayable
event VestingEscrowCreated:
funder: indexed(address)
token: indexed(ERC20)
recipient: indexed(address)
escrow: address
amount: uint256
vesting_start: uint256
vesting_duration: uint256
cliff_length: uint256
open_claim: bool
TARGET: public(immutable(address))
VYPER: public(immutable(address))
escrows_length: public(uint256)
escrows: public(address[1000000000000])
@external
def __init__(target: address, vyper_donate: address):
"""
@notice Contract constructor
@dev Prior to deployment you must deploy one copy of `VestingEscrowSimple` which
is used as a library for vesting contracts deployed by this factory
@param target `VestingEscrowSimple` contract address
@param vyper_donate Vyper Safe address for donations (vyperlang.eth on mainnet)
"""
TARGET = target
VYPER = vyper_donate
@external
def deploy_vesting_contract(
token: ERC20,
recipient: address,
amount: uint256,
vesting_duration: uint256,
vesting_start: uint256 = block.timestamp,
cliff_length: uint256 = 0,
open_claim: bool = True,
support_vyper: uint256 = 0,
owner: address = msg.sender,
) -> address:
"""
@notice Deploy a new vesting contract
@dev Prior to deployment you must approve `amount` + `amount` * `support_vyper` / 10_000
tokens
@param token ERC20 token being distributed
@param recipient Address to vest tokens for
@param amount Amount of tokens being vested for `recipient`
@param vesting_duration Time period (in seconds) over which tokens are released
@param vesting_start Epoch time when tokens begin to vest
@param open_claim Switch if anyone can claim for `recipient`
@param support_vyper Donation percentage in bps, 0% by default
@param owner Vesting contract owner
"""
assert cliff_length <= vesting_duration # dev: incorrect vesting cliff
assert vesting_start + vesting_duration > block.timestamp # dev: just use a transfer, dummy
assert vesting_duration > 0 # dev: duration must be > 0
assert recipient not in [self, empty(address), token.address, owner] # dev: wrong recipient
escrow: address = create_minimal_proxy_to(TARGET)
VestingEscrowSimple(escrow).initialize(
owner,
token,
recipient,
amount,
vesting_start,
vesting_start + vesting_duration,
cliff_length,
open_claim,
)
# skip transferFrom and approve and send directly to escrow
assert token.transferFrom(msg.sender, escrow, amount, default_return_value=True) # dev: funding failed
if support_vyper > 0:
assert VYPER != empty(address) # dev: lost donation
assert token.transferFrom(
msg.sender,
VYPER,
amount * support_vyper / 10_000,
default_return_value=True
) # dev: donation failed
self.escrows[self.escrows_length] = escrow
self.escrows_length += 1
log VestingEscrowCreated(
msg.sender,
token,
recipient,
escrow,
amount,
vesting_start,
vesting_duration,
cliff_length,
open_claim,
)
return escrow
Read Contract
TARGET 0xcc1f2afa → address
VYPER 0x6a81ec44 → address
escrows 0x012f52ee → address
escrows_length 0xadf8e963 → uint256
Write Contract 6 functions
These functions modify contract state and require a wallet transaction to execute.
deploy_vesting_contract 0x0551ebac
address token
address recipient
uint256 amount
uint256 vesting_duration
returns: address
deploy_vesting_contract 0xab5eea59
address token
address recipient
uint256 amount
uint256 vesting_duration
uint256 vesting_start
returns: address
deploy_vesting_contract 0xc367cc80
address token
address recipient
uint256 amount
uint256 vesting_duration
uint256 vesting_start
uint256 cliff_length
returns: address
deploy_vesting_contract 0xe7eba643
address token
address recipient
uint256 amount
uint256 vesting_duration
uint256 vesting_start
uint256 cliff_length
bool open_claim
returns: address
deploy_vesting_contract 0x73c258a9
address token
address recipient
uint256 amount
uint256 vesting_duration
uint256 vesting_start
uint256 cliff_length
bool open_claim
uint256 support_vyper
returns: address
deploy_vesting_contract 0xbabce1b9
address token
address recipient
uint256 amount
uint256 vesting_duration
uint256 vesting_start
uint256 cliff_length
bool open_claim
uint256 support_vyper
address owner
returns: address
Recent Transactions
No transactions found for this address