Skip to content
Verified contractPartial

Vyper_contract

Address0x4cffb1e77c2eac1e6f4697bb433cca9edac7eed7
Balance

0 ETH

 

Transactions

2

 

Compiler

vyper 0.2.7

 

Same code

3 more contracts

 

Details

Compiler
vyper 0.2.7+commit.0b3f3b3
Language
vyper
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
11,406,959
Creation transaction
0x4cd5737287…f9cb9a74e5

Vyper_contract.vy

unlockDate: public(uint256)
ifexTokenContract: public(address)
owner: public(address)

isInitialized: public(bool)

interface ERC20:
    def transfer(_to : address, _value : uint256) -> bool: nonpayable    
    def balanceOf(_owner: address) -> uint256: view

@internal
def ownable(account: address):
    assert account == self.owner, "Not owner!"

@external
def initialize(_unlockDate: uint256, _ifexTokenContract: address):
    assert self.isInitialized == False, "Vault already initialized"
    self.isInitialized = True
    self.unlockDate = _unlockDate
    self.ifexTokenContract = _ifexTokenContract
    self.owner = msg.sender

@external
def withdraw():
    self.ownable(msg.sender)
    assert block.timestamp >= self.unlockDate, "Vault is locked"
    ERC20(self.ifexTokenContract).transfer(msg.sender, ERC20(self.ifexTokenContract).balanceOf(self))

@external
def changeOwner(newOwner: address):
    self.ownable(msg.sender)
    self.owner = newOwner
Compiler settingsShow
{
  "search_paths": [
    "."
  ]
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.