ETH Price: $2,478.77 (-3.63%)

Token

Woofy (WOOFY)
 

Overview

Max Total Supply

26,777,995.082224310812 WOOFY

Holders

2,894 (0.00%)

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 12 Decimals)

Filtered by Token Holder
Null: 0x000...000
Balance
0 WOOFY

Value
$0.00
0x0000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Wuff wuff.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.12

Optimization Enabled:
N/A

Other Settings:
MIT license

Contract Source Code (Vyper language format)

# @version 0.2.12
from vyper.interfaces import ERC20

implements: ERC20

event Transfer:
    sender: indexed(address)
    receiver: indexed(address)
    value: uint256


event Approval:
    owner: indexed(address)
    spender: indexed(address)
    value: uint256


allowance: public(HashMap[address, HashMap[address, uint256]])
balanceOf: public(HashMap[address, uint256])
totalSupply: public(uint256)
nonces: public(HashMap[address, uint256])
DOMAIN_SEPARATOR: public(bytes32)
DOMAIN_TYPE_HASH: constant(bytes32) = keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)')
PERMIT_TYPE_HASH: constant(bytes32) = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)")

YFI: constant(address) = 0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e


@external
def __init__():
    self.DOMAIN_SEPARATOR = keccak256(
        concat(
            DOMAIN_TYPE_HASH,
            keccak256(convert("Woofy", Bytes[5])),
            keccak256(convert("1", Bytes[1])),
            convert(chain.id, bytes32),
            convert(self, bytes32)
        )
    )


@view
@external
def name() -> String[5]:
    return "Woofy"


@view
@external
def symbol() -> String[5]:
    return "WOOFY"


@view
@external
def decimals() -> uint256:
    return 12


@internal
def _mint(receiver: address, amount: uint256):
    assert not receiver in [self, ZERO_ADDRESS]

    self.balanceOf[receiver] += amount
    self.totalSupply += amount

    log Transfer(ZERO_ADDRESS, receiver, amount)


@internal
def _burn(sender: address, amount: uint256):
    self.balanceOf[sender] -= amount
    self.totalSupply -= amount

    log Transfer(sender, ZERO_ADDRESS, amount)


@internal
def _transfer(sender: address, receiver: address, amount: uint256):
    assert not receiver in [self, ZERO_ADDRESS]

    self.balanceOf[sender] -= amount
    self.balanceOf[receiver] += amount

    log Transfer(sender, receiver, amount)


@external
def transfer(receiver: address, amount: uint256) -> bool:
    self._transfer(msg.sender, receiver, amount)
    return True


@external
def transferFrom(sender: address, receiver: address, amount: uint256) -> bool:
    self.allowance[sender][msg.sender] -= amount
    self._transfer(sender, receiver, amount)
    return True


@external
def approve(spender: address, amount: uint256) -> bool:
    self.allowance[msg.sender][spender] = amount
    log Approval(msg.sender, spender, amount)
    return True


@external
def woof(amount: uint256 = MAX_UINT256, receiver: address = msg.sender) -> bool:
    mint_amount: uint256 = min(amount, ERC20(YFI).balanceOf(msg.sender))
    assert ERC20(YFI).transferFrom(msg.sender, self, mint_amount)
    self._mint(receiver, mint_amount)
    return True


@external
def unwoof(amount: uint256 = MAX_UINT256, receiver: address = msg.sender) -> bool:
    burn_amount: uint256 = min(amount, self.balanceOf[msg.sender])
    self._burn(msg.sender, burn_amount)
    assert ERC20(YFI).transfer(receiver, burn_amount)
    return True


@external
def permit(owner: address, spender: address, amount: uint256, expiry: uint256, signature: Bytes[65]) -> bool:
    assert owner != ZERO_ADDRESS  # dev: invalid owner
    assert expiry == 0 or expiry >= block.timestamp  # dev: permit expired
    nonce: uint256 = self.nonces[owner]
    digest: bytes32 = keccak256(
        concat(
            b'\x19\x01',
            self.DOMAIN_SEPARATOR,
            keccak256(
                concat(
                    PERMIT_TYPE_HASH,
                    convert(owner, bytes32),
                    convert(spender, bytes32),
                    convert(amount, bytes32),
                    convert(nonce, bytes32),
                    convert(expiry, bytes32),
                )
            )
        )
    )
    # NOTE: signature is packed as r, s, v
    r: uint256 = convert(slice(signature, 0, 32), uint256)
    s: uint256 = convert(slice(signature, 32, 32), uint256)
    v: uint256 = convert(slice(signature, 64, 1), uint256)
    assert ecrecover(digest, v, r, s) == owner  # dev: invalid signature
    self.allowance[owner][spender] = amount
    self.nonces[owner] = nonce + 1
    log Approval(owner, spender, amount)
    return True

Contract Security Audit

Contract ABI

[{"name":"Transfer","inputs":[{"name":"sender","type":"address","indexed":true},{"name":"receiver","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"},{"stateMutability":"nonpayable","type":"constructor","inputs":[],"outputs":[]},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":5916},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":5946},{"stateMutability":"view","type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":348},{"stateMutability":"nonpayable","type":"function","name":"transfer","inputs":[{"name":"receiver","type":"address"},{"name":"amount","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":78588},{"stateMutability":"nonpayable","type":"function","name":"transferFrom","inputs":[{"name":"sender","type":"address"},{"name":"receiver","type":"address"},{"name":"amount","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":116239},{"stateMutability":"nonpayable","type":"function","name":"approve","inputs":[{"name":"spender","type":"address"},{"name":"amount","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":37881},{"stateMutability":"nonpayable","type":"function","name":"woof","inputs":[],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"woof","inputs":[{"name":"amount","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"woof","inputs":[{"name":"amount","type":"uint256"},{"name":"receiver","type":"address"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"unwoof","inputs":[],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"unwoof","inputs":[{"name":"amount","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"unwoof","inputs":[{"name":"amount","type":"uint256"},{"name":"receiver","type":"address"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"permit","inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"},{"name":"amount","type":"uint256"},{"name":"expiry","type":"uint256"},{"name":"signature","type":"bytes"}],"outputs":[{"name":"","type":"bool"}],"gas":91134},{"stateMutability":"view","type":"function","name":"allowance","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3088},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":2903},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2718},{"stateMutability":"view","type":"function","name":"nonces","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":2963},{"stateMutability":"view","type":"function","name":"DOMAIN_SEPARATOR","inputs":[],"outputs":[{"name":"","type":"bytes32"}],"gas":2778}]

60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020826105200101526020810190506005610400527f576f6f66790000000000000000000000000000000000000000000000000000006104205261040080516020820120905060208261052001015260208101905060016104c0527f31000000000000000000000000000000000000000000000000000000000000006104e0526104c0805160208201209050602082610520010152602081019050466020826105200101526020810190503060208261052001015260208101905080610520526105209050805160208201209050600455610e5b56600436101561000d57610ac6565b600035601c52600051341561002157600080fd5b6306fdde038114156100b6576005610140527f576f6f6679000000000000000000000000000000000000000000000000000000610160526101408051602001806101e08284600060045af161007557600080fd5b50506101e0518061020001818260206001820306601f820103905003368237505060206101c05260406101e0510160206001820306601f82010390506101c0f35b6395d89b4181141561014b576005610140527f574f4f4659000000000000000000000000000000000000000000000000000000610160526101408051602001806101e08284600060045af161010a57600080fd5b50506101e0518061020001818260206001820306601f820103905003368237505060206101c05260406101e0510160206001820306601f82010390506101c0f35b63313ce56781141561016257600c60005260206000f35b63a9059cbb8114156101b45760043560a01c1561017e57600080fd5b3361014052600435610160526024356101805261018051610160516101405160065801610c58565b600050600160005260206000f35b6323b872dd8114156102505760043560a01c156101d057600080fd5b60243560a01c156101e057600080fd5b600060043560e05260c052604060c0203360e05260c052604060c02080546044358082101561020e57600080fd5b8082039050905081555060043561014052602435610160526044356101805261018051610160516101405160065801610c58565b600050600160005260206000f35b63095ea7b38114156102c95760043560a01c1561026c57600080fd5b60243560003360e05260c052604060c02060043560e05260c052604060c0205560243561014052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a3600160005260206000f35b63dc72aa27811415610304577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61014052336101605261035e565b63ab8f90c3811415610325573361016052602060046101403760005061035e565b63398885c881141561035957602060046101403760243560a01c1561034957600080fd5b602060246101603760005061035e565b610471565b61014051602061022060246370a082316101a052336101c0526101bc730bc529c00c6401aef6d220be8c6ea1667f6ad93e5afa61039a57600080fd5b601f3d116103a757600080fd5b60005061022051808211156103bc57806103be565b815b9050905061018052602061026060646323b872dd6101a052336101c052306101e05261018051610200526101bc6000730bc529c00c6401aef6d220be8c6ea1667f6ad93e5af161040d57600080fd5b601f3d1161041a57600080fd5b6000506102605161042a57600080fd5b610140516101605161018051610160516101a052610180516101c0526101c0516101a05160065801610acc565b610180526101605261014052600050600160005260206000f35b63b3bc4d6a8114156104ac577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610140523361016052610506565b6335118f748114156104cd5733610160526020600461014037600050610506565b634838083e81141561050157602060046101403760243560a01c156104f157600080fd5b6020602461016037600050610506565b6105d7565b6101405160013360e05260c052604060c02054808211156105275780610529565b815b9050905061018052610140516101605161018051336101a052610180516101c0526101c0516101a05160065801610bc4565b6101805261016052610140526000506020610240604463a9059cbb6101a052610160516101c052610180516101e0526101bc6000730bc529c00c6401aef6d220be8c6ea1667f6ad93e5af16105af57600080fd5b601f3d116105bc57600080fd5b600050610240516105cc57600080fd5b600160005260206000f35b639fd5a6cf8114156109d45760043560a01c156105f357600080fd5b60243560a01c1561060357600080fd5b606160843560040161014037604160843560040135111561062357600080fd5b60006004351861063257600080fd5b6064351515610642576001610649565b4260643510155b61065257600080fd5b600360043560e05260c052604060c020546101e05260006002610520527f19010000000000000000000000000000000000000000000000000000000000006105405261052060028060208461078001018260208501600060045af150508051820191505060045460208261078001015260208101905060007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96020826106800101526020810190506004356020826106800101526020810190506024356020826106800101526020810190506044356020826106800101526020810190506101e0516020826106800101526020810190506064356020826106800101526020810190508061068052610680905080516020820120905060208261078001015260208101905080610780526107809050805160208201209050610200526000602060208206610300016101405182840111156107ac57600080fd5b6041806103208260206020880688030161014001600060045af15050818152809050905090508060200151600082518060209013156107ea57600080fd5b80919012156107f857600080fd5b806020036101000a82049050905090506102205260206020602082066103200161014051828401111561082a57600080fd5b6041806103408260206020880688030161014001600060045af150508181528090509050905080602001516000825180602090131561086857600080fd5b809190121561087657600080fd5b806020036101000a8204905090509050610240526040600160208206610340016101405182840111156108a857600080fd5b6041806103608260206020880688030161014001600060045af15050818152809050905090508060200151600082518060209013156108e657600080fd5b80919012156108f457600080fd5b806020036101000a8204905090509050610260526004356102005161028052610260516102a052610220516102c052610240516102e052602060c0608061028060015afa5060c0511461094657600080fd5b604435600060043560e05260c052604060c02060243560e05260c052604060c020556101e051600181818301101561097d57600080fd5b80820190509050600360043560e05260c052604060c02055604435610280526024356004357f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610280a3600160005260206000f35b63dd62ed3e811415610a285760043560a01c156109f057600080fd5b60243560a01c15610a0057600080fd5b600060043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b6370a08231811415610a5e5760043560a01c15610a4457600080fd5b600160043560e05260c052604060c0205460005260206000f35b6318160ddd811415610a765760025460005260206000f35b637ecebe00811415610aac5760043560a01c15610a9257600080fd5b600360043560e05260c052604060c0205460005260206000f35b633644e515811415610ac45760045460005260206000f35b505b60006000fd5b610180526101405261016052306101c05260006101e05260006101a0526101a061012060006002818352015b610120516020026101c00151610140511415610b175760018352610b27565b8151600101808352811415610af8575b5050506101a05115610b3857600080fd5b60016101405160e05260c052604060c020805461016051818183011015610b5e57600080fd5b808201905090508155506002805461016051818183011015610b7f57600080fd5b80820190509050815550610160516101a0526101405160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101a0a361018051565b61018052610140526101605260016101405160e05260c052604060c02080546101605180821015610bf457600080fd5b80820390509050815550600280546101605180821015610c1357600080fd5b80820390509050815550610160516101a0526000610140517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101a0a361018051565b6101a052610140526101605261018052306101e05260006102005260006101c0526101c061012060006002818352015b610120516020026101e00151610160511415610ca75760018352610cb7565b8151600101808352811415610c88575b5050506101c05115610cc857600080fd5b60016101405160e05260c052604060c02080546101805180821015610cec57600080fd5b8082039050905081555060016101605160e05260c052604060c020805461018051818183011015610d1c57600080fd5b80820190509050815550610180516101c05261016051610140517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101c0a36101a051565b6100f8610e5b036100f86000396100f8610e5b036000f3

Deployed Bytecode

0x600436101561000d57610ac6565b600035601c52600051341561002157600080fd5b6306fdde038114156100b6576005610140527f576f6f6679000000000000000000000000000000000000000000000000000000610160526101408051602001806101e08284600060045af161007557600080fd5b50506101e0518061020001818260206001820306601f820103905003368237505060206101c05260406101e0510160206001820306601f82010390506101c0f35b6395d89b4181141561014b576005610140527f574f4f4659000000000000000000000000000000000000000000000000000000610160526101408051602001806101e08284600060045af161010a57600080fd5b50506101e0518061020001818260206001820306601f820103905003368237505060206101c05260406101e0510160206001820306601f82010390506101c0f35b63313ce56781141561016257600c60005260206000f35b63a9059cbb8114156101b45760043560a01c1561017e57600080fd5b3361014052600435610160526024356101805261018051610160516101405160065801610c58565b600050600160005260206000f35b6323b872dd8114156102505760043560a01c156101d057600080fd5b60243560a01c156101e057600080fd5b600060043560e05260c052604060c0203360e05260c052604060c02080546044358082101561020e57600080fd5b8082039050905081555060043561014052602435610160526044356101805261018051610160516101405160065801610c58565b600050600160005260206000f35b63095ea7b38114156102c95760043560a01c1561026c57600080fd5b60243560003360e05260c052604060c02060043560e05260c052604060c0205560243561014052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a3600160005260206000f35b63dc72aa27811415610304577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61014052336101605261035e565b63ab8f90c3811415610325573361016052602060046101403760005061035e565b63398885c881141561035957602060046101403760243560a01c1561034957600080fd5b602060246101603760005061035e565b610471565b61014051602061022060246370a082316101a052336101c0526101bc730bc529c00c6401aef6d220be8c6ea1667f6ad93e5afa61039a57600080fd5b601f3d116103a757600080fd5b60005061022051808211156103bc57806103be565b815b9050905061018052602061026060646323b872dd6101a052336101c052306101e05261018051610200526101bc6000730bc529c00c6401aef6d220be8c6ea1667f6ad93e5af161040d57600080fd5b601f3d1161041a57600080fd5b6000506102605161042a57600080fd5b610140516101605161018051610160516101a052610180516101c0526101c0516101a05160065801610acc565b610180526101605261014052600050600160005260206000f35b63b3bc4d6a8114156104ac577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610140523361016052610506565b6335118f748114156104cd5733610160526020600461014037600050610506565b634838083e81141561050157602060046101403760243560a01c156104f157600080fd5b6020602461016037600050610506565b6105d7565b6101405160013360e05260c052604060c02054808211156105275780610529565b815b9050905061018052610140516101605161018051336101a052610180516101c0526101c0516101a05160065801610bc4565b6101805261016052610140526000506020610240604463a9059cbb6101a052610160516101c052610180516101e0526101bc6000730bc529c00c6401aef6d220be8c6ea1667f6ad93e5af16105af57600080fd5b601f3d116105bc57600080fd5b600050610240516105cc57600080fd5b600160005260206000f35b639fd5a6cf8114156109d45760043560a01c156105f357600080fd5b60243560a01c1561060357600080fd5b606160843560040161014037604160843560040135111561062357600080fd5b60006004351861063257600080fd5b6064351515610642576001610649565b4260643510155b61065257600080fd5b600360043560e05260c052604060c020546101e05260006002610520527f19010000000000000000000000000000000000000000000000000000000000006105405261052060028060208461078001018260208501600060045af150508051820191505060045460208261078001015260208101905060007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96020826106800101526020810190506004356020826106800101526020810190506024356020826106800101526020810190506044356020826106800101526020810190506101e0516020826106800101526020810190506064356020826106800101526020810190508061068052610680905080516020820120905060208261078001015260208101905080610780526107809050805160208201209050610200526000602060208206610300016101405182840111156107ac57600080fd5b6041806103208260206020880688030161014001600060045af15050818152809050905090508060200151600082518060209013156107ea57600080fd5b80919012156107f857600080fd5b806020036101000a82049050905090506102205260206020602082066103200161014051828401111561082a57600080fd5b6041806103408260206020880688030161014001600060045af150508181528090509050905080602001516000825180602090131561086857600080fd5b809190121561087657600080fd5b806020036101000a8204905090509050610240526040600160208206610340016101405182840111156108a857600080fd5b6041806103608260206020880688030161014001600060045af15050818152809050905090508060200151600082518060209013156108e657600080fd5b80919012156108f457600080fd5b806020036101000a8204905090509050610260526004356102005161028052610260516102a052610220516102c052610240516102e052602060c0608061028060015afa5060c0511461094657600080fd5b604435600060043560e05260c052604060c02060243560e05260c052604060c020556101e051600181818301101561097d57600080fd5b80820190509050600360043560e05260c052604060c02055604435610280526024356004357f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610280a3600160005260206000f35b63dd62ed3e811415610a285760043560a01c156109f057600080fd5b60243560a01c15610a0057600080fd5b600060043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b6370a08231811415610a5e5760043560a01c15610a4457600080fd5b600160043560e05260c052604060c0205460005260206000f35b6318160ddd811415610a765760025460005260206000f35b637ecebe00811415610aac5760043560a01c15610a9257600080fd5b600360043560e05260c052604060c0205460005260206000f35b633644e515811415610ac45760045460005260206000f35b505b60006000fd5b610180526101405261016052306101c05260006101e05260006101a0526101a061012060006002818352015b610120516020026101c00151610140511415610b175760018352610b27565b8151600101808352811415610af8575b5050506101a05115610b3857600080fd5b60016101405160e05260c052604060c020805461016051818183011015610b5e57600080fd5b808201905090508155506002805461016051818183011015610b7f57600080fd5b80820190509050815550610160516101a0526101405160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101a0a361018051565b61018052610140526101605260016101405160e05260c052604060c02080546101605180821015610bf457600080fd5b80820390509050815550600280546101605180821015610c1357600080fd5b80820390509050815550610160516101a0526000610140517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101a0a361018051565b6101a052610140526101605261018052306101e05260006102005260006101c0526101c061012060006002818352015b610120516020026101e00151610160511415610ca75760018352610cb7565b8151600101808352811415610c88575b5050506101c05115610cc857600080fd5b60016101405160e05260c052604060c02080546101805180821015610cec57600080fd5b8082039050905081555060016101605160e05260c052604060c020805461018051818183011015610d1c57600080fd5b80820190509050815550610180516101c05261016051610140517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101c0a36101a05156

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.