Contract 0x91e8A09636e93bb9f76316C613E508A383Df583D

 
Txn Hash
Method
Block
From
To
Value
0x0a88a2fd8318bea54d90e335f70f4f85fbe133a1284c6e892badf5835593e2a6Transfer Ownersh...120711902021-03-19 19:49:14505 days 19 hrs ago0x5c33739b7b72b7d190e717d81e9693d9e83b955f IN  0x91e8a09636e93bb9f76316c613e508a383df583d0 Ether0.00484155166
0x679eb3a4463a901d3d69fa71f1d1c7b9d86240f9f2521de5abb56011883dfb430x6040610b120710592021-03-19 19:18:26505 days 20 hrs ago0x5c33739b7b72b7d190e717d81e9693d9e83b955f IN  Create: Vyper_contract0 Ether0.13357916193
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.11

Optimization Enabled:
N/A

Other Settings:
MIT license

Contract Source Code (Vyper language format)

# @version ^0.2.8
# https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
'''
@title FLEX Coin ERC-20 Token
@author Sitt Guruvanich
@notice Implementation of FLEX Coin used by CoinFLEX
@dev Follows the ERC-20 token standard as defined at
     https://eips.ethereum.org/EIPS/eip-20
'''
from vyper.interfaces import ERC20
implements: ERC20

### Events ###
event Transfer: # ERC-20
  _from: indexed(address)
  _to: indexed(address)
  _value: uint256

event Approval: # ERC-20
  _owner: indexed(address)
  _spender: indexed(address)
  _value: uint256

event OwnershipTransferred: # Ownable
  _prev_owner: indexed(address)
  _new_owner:  indexed(address)

### Member Variables ###
name: public(String[64])
symbol: public(String[32])
balanceOf: public(HashMap[address, uint256])
allowance: public(HashMap[address, HashMap[address, uint256]])
totalSupply: public(uint256)
owner: public(address) # Implements Ownable

@external
def __init__(_name: String[64], _symbol: String[32]):
  self.name = _name
  self.symbol = _symbol
  self.owner = msg.sender
  log Transfer(ZERO_ADDRESS, msg.sender, 0)

@view
@external
def decimals() -> uint256:
  '''
  @notice Get the number of decimals for this token
  @dev Implemented as a view method to reduce gas costs
  @return uint256 decimal places
  '''
  return 18

@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.
  '''
  # NOTE: vyper does not allow underflows
  #       so the following subtraction would revert on insufficient balance
  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
  _allowance: uint256 = self.allowance[_from][msg.sender]
  if _allowance != MAX_UINT256:
    self.allowance[_from][msg.sender] = _allowance - _value
  log Transfer(_from, _to, _value)
  return True

@external
def approve(_spender : address, _value : uint256) -> bool:
  '''
  @notice Approve the passed address to transfer the specified amount of
          tokens on behalf of msg.sender
  @dev Beware that changing an allowance via this method brings the risk
       that someone may use both the old and new allowance by unfortunate
       transaction ordering. This may be mitigated with the use of
       {increaseAllowance} and {decreaseAllowance}.
       https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
  @param _spender The address which will transfer the funds
  @param _value The amount of tokens that may be transferred
  @return bool success
  '''
  self.allowance[msg.sender][_spender] = _value
  log Approval(msg.sender, _spender, _value)
  return True

@external
def increaseAllowance(_spender: address, _added_value: uint256) -> bool:
  '''
  @notice Increase the allowance granted to `_spender` by the caller
  @dev This is alternative to {approve} that can be used as a mitigation for
       the potential race condition
  @param _spender The address which will transfer the funds
  @param _added_value The amount of to increase the allowance
  @return bool success
  '''
  allowance: uint256 = self.allowance[msg.sender][_spender] + _added_value
  self.allowance[msg.sender][_spender] = allowance
  log Approval(msg.sender, _spender, allowance)
  return True

@external
def decreaseAllowance(_spender: address, _subtracted_value: uint256) -> bool:
  '''
  @notice Decrease the allowance granted to `_spender` by the caller
  @dev This is alternative to {approve} that can be used as a mitigation for
       the potential race condition
  @param _spender The address which will transfer the funds
  @param _subtracted_value The amount of to decrease the allowance
  @return bool success
  '''
  allowance: uint256 = self.allowance[msg.sender][_spender] - _subtracted_value
  self.allowance[msg.sender][_spender] = allowance
  log Approval(msg.sender, _spender, allowance)
  return True

@external
def mint(_to: address, _value: uint256) -> bool:
  '''
  @notice Mint an amount of the token and assigns it to an account.
       This encapsulates the modification of balances such that the
       proper events are emitted.
  @dev only contract owner has access to this action
  @param _to The account that will receive the created tokens.
  @param _value The amount that will be created.
  '''
  assert msg.sender == self.owner, 'Only contract owner is permitted to this action.' # dev: only owner
  self.totalSupply += _value
  self.balanceOf[_to] += _value
  log Transfer(ZERO_ADDRESS, _to, _value)
  return True

@external
def burnFrom(_to: address, _value: uint256) -> bool:
  '''
  @notice Burn an amount of the token from a given account.
  @dev only contract owner has access to this action
  @param _to The account whose tokens will be burned.
  @param _value The amount that will be burned.
  '''
  assert msg.sender == self.owner, 'Only contract owner is permitted to this action.' # dev: only owner
  self.totalSupply -= _value
  self.balanceOf[_to] -= _value
  log Transfer(_to, ZERO_ADDRESS, _value)
  return True

@external
def transferOwnership(_addr: address) -> bool:
  '''
  @notice Transfer ownership for this contract; Only one owner address allowed
  @dev only contract owner has access to this action
  @param _addr  the address to transfer this contract's ownership to
  '''
  assert msg.sender == self.owner, 'Only contract owner is permitted to this action.' # dev: only owner
  assert _addr != ZERO_ADDRESS, 'Cannot transfer contract ownership to zero address.' # dev: cannot transfer ownership to zero address
  self.owner = _addr # dev: set new owner
  log OwnershipTransferred(msg.sender, _addr)
  return True

Contract Security Audit

Contract ABI

[{"name":"Transfer","inputs":[{"name":"_from","type":"address","indexed":true},{"name":"_to","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":"OwnershipTransferred","inputs":[{"name":"_prev_owner","type":"address","indexed":true},{"name":"_new_owner","type":"address","indexed":true}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":288},{"stateMutability":"nonpayable","type":"function","name":"transfer","inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":74740},{"stateMutability":"nonpayable","type":"function","name":"transferFrom","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":111382},{"stateMutability":"nonpayable","type":"function","name":"approve","inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":37821},{"stateMutability":"nonpayable","type":"function","name":"increaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_added_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":39065},{"stateMutability":"nonpayable","type":"function","name":"decreaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_subtracted_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":39089},{"stateMutability":"nonpayable","type":"function","name":"mint","inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":75717},{"stateMutability":"nonpayable","type":"function","name":"burnFrom","inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":75735},{"stateMutability":"nonpayable","type":"function","name":"transferOwnership","inputs":[{"name":"_addr","type":"address"}],"outputs":[{"name":"","type":"bool"}],"gas":38211},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":7760},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":6813},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":1633},{"stateMutability":"view","type":"function","name":"allowance","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":1878},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":1478},{"stateMutability":"view","type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":1508}]

6040610b0e6101403960606020610b0e60c03960c051610b0e016101803960406020610b0e60c03960c05160040135111561003957600080fd5b604060206020610b0e0160c03960c051610b0e0161020039602060206020610b0e0160c03960c05160040135111561007057600080fd5b61018080600060c052602060c020602082510161012060006003818352015b826101205160200211156100a2576100c4565b61012051602002850151610120518501555b815160010180835281141561008f575b50505050505061020080600160c052602060c020602082510161012060006002818352015b826101205160200211156100fc5761011e565b61012051602002850151610120518501555b81516001018083528114156100e9575b505050505050336005556000610260523360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610260a3610af656600436101561000d57610993565b600035601c52600051341561002157600080fd5b63313ce56781141561003857601260005260206000f35b63a9059cbb8114156100e95760043560a01c1561005457600080fd5b60023360e05260c052604060c02080546024358082101561007457600080fd5b80820390509050815550600260043560e05260c052604060c02080546024358181830110156100a257600080fd5b8082019050905081555060243561014052600435337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610140a3600160005260206000f35b6323b872dd8114156102335760043560a01c1561010557600080fd5b60243560a01c1561011557600080fd5b600260043560e05260c052604060c02080546044358082101561013757600080fd5b80820390509050815550600260243560e05260c052604060c020805460443581818301101561016557600080fd5b80820190509050815550600360043560e05260c052604060c0203360e05260c052604060c02054610140527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101405118156101f45761014051604435808210156101cf57600080fd5b80820390509050600360043560e05260c052604060c0203360e05260c052604060c020555b604435610160526024356004357fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610160a3600160005260206000f35b63095ea7b38114156102ac5760043560a01c1561024f57600080fd5b60243560033360e05260c052604060c02060043560e05260c052604060c0205560243561014052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a3600160005260206000f35b63395093518114156103615760043560a01c156102c857600080fd5b60033360e05260c052604060c02060043560e05260c052604060c020546024358181830110156102f757600080fd5b80820190509050610140526101405160033360e05260c052604060c02060043560e05260c052604060c020556101405161016052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610160a3600160005260206000f35b63a457c2d78114156104145760043560a01c1561037d57600080fd5b60033360e05260c052604060c02060043560e05260c052604060c02054602435808210156103aa57600080fd5b80820390509050610140526101405160033360e05260c052604060c02060043560e05260c052604060c020556101405161016052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610160a3600160005260206000f35b6340c10f198114156105315760043560a01c1561043057600080fd5b600554331415156104a5576308c379a0610140526020610160526030610180527f4f6e6c7920636f6e7472616374206f776e6572206973207065726d69747465646101a0527f20746f207468697320616374696f6e2e000000000000000000000000000000006101c05261018050608461015cfd5b600480546024358181830110156104bb57600080fd5b80820190509050815550600260043560e05260c052604060c02080546024358181830110156104e957600080fd5b808201905090508155506024356101405260043560007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610140a3600160005260206000f35b6379cc679081141561064a5760043560a01c1561054d57600080fd5b600554331415156105c2576308c379a0610140526020610160526030610180527f4f6e6c7920636f6e7472616374206f776e6572206973207065726d69747465646101a0527f20746f207468697320616374696f6e2e000000000000000000000000000000006101c05261018050608461015cfd5b60048054602435808210156105d657600080fd5b80820390509050815550600260043560e05260c052604060c02080546024358082101561060257600080fd5b808203905090508155506024356101405260006004357fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610140a3600160005260206000f35b63f2fde38b81141561078d5760043560a01c1561066657600080fd5b600554331415156106db576308c379a0610140526020610160526030610180527f4f6e6c7920636f6e7472616374206f776e6572206973207065726d69747465646101a0527f20746f207468697320616374696f6e2e000000000000000000000000000000006101c05261018050608461015cfd5b600060043514151515610752576308c379a0610140526020610160526033610180527f43616e6e6f74207472616e7366657220636f6e7472616374206f776e657273686101a0527f697020746f207a65726f20616464726573732e000000000000000000000000006101c05261018050608461015cfd5b600435600555600435337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060006000a3600160005260206000f35b6306fdde038114156108325760008060c052602060c020610180602082540161012060006003818352015b826101205160200211156107cb576107ed565b61012051850154610120516020028501525b81516001018083528114156107b8575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6395d89b418114156108d75760018060c052602060c020610180602082540161012060006002818352015b8261012051602002111561087057610892565b61012051850154610120516020028501525b815160010180835281141561085d575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6370a0823181141561090d5760043560a01c156108f357600080fd5b600260043560e05260c052604060c0205460005260206000f35b63dd62ed3e8114156109615760043560a01c1561092957600080fd5b60243560a01c1561093957600080fd5b600360043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b6318160ddd8114156109795760045460005260206000f35b638da5cb5b8114156109915760055460005260206000f35b505b60006000fd5b61015d610af60361015d60003961015d610af6036000f3000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000009464c455820436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004464c455800000000000000000000000000000000000000000000000000000000

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000009464c455820436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004464c455800000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): FLEX Coin
Arg [1] : _symbol (string): FLEX

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [3] : 464c455820436f696e0000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [5] : 464c455800000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.