ETH Price: $3,397.76 (+1.57%)

Token

Yearn Finance Diamond Token Two (YFDTTWO)
 

Overview

Max Total Supply

7,000 YFDTTWO

Holders

313

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Filtered by Token Holder
hayleywilliams.eth
Balance
2.38 YFDTTWO

Value
$0.00
0x70981969Fb2eE716f8297B0736a80a908EF842a8
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
YearnFinanceDiamondTokentTwo

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at Etherscan.io on 2020-10-04
*/

pragma solidity ^0.5.0;

// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
//
// ----------------------------------------------------------------------------
contract ERC20Interface {
    function totalSupply() public view returns (uint);
    function balanceOf(address tokenOwner) public view returns (uint balance);
    function allowance(address tokenOwner, address spender) public view returns (uint remaining);
    function transfer(address to, uint tokens) public returns (bool success);
    function approve(address spender, uint tokens) public returns (bool success);
    function transferFrom(address from, address to, uint tokens) public returns (bool success);

    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}

// ----------------------------------------------------------------------------
// Safe Math Library 
// ----------------------------------------------------------------------------
contract SafeMath {
    function safeAdd(uint a, uint b) public pure returns (uint c) {
        c = a + b;
        require(c >= a);
    }
    function safeSub(uint a, uint b) public pure returns (uint c) {
        require(b <= a); c = a - b; } function safeMul(uint a, uint b) public pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); } function safeDiv(uint a, uint b) public pure returns (uint c) { require(b > 0);
        c = a / b;
    }
}


contract YearnFinanceDiamondTokentTwo is ERC20Interface, SafeMath {
    string public name;
    string public symbol;
    uint8 public decimals; // 18 decimals is the strongly suggested default, avoid changing it
    
    uint256 public _totalSupply;
    
    mapping(address => uint) balances;
    mapping(address => mapping(address => uint)) allowed;
    
    /**
     * Constrctor function
     *
     * Initializes contract with initial supply tokens to the creator of the contract
     */
    constructor() public {
        name = "Yearn Finance Diamond Token Two";
        symbol = "YFDTTWO";
        decimals = 18;
        _totalSupply = 7000000000000000000000;
        
        balances[msg.sender] = _totalSupply;
        emit Transfer(address(0), msg.sender, _totalSupply);
    }
    
    function totalSupply() public view returns (uint) {
        return _totalSupply  - balances[address(0)];
    }
    
    function balanceOf(address tokenOwner) public view returns (uint balance) {
        return balances[tokenOwner];
    }
    
    function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
        return allowed[tokenOwner][spender];
    }
    
    function approve(address spender, uint tokens) public returns (bool success) {
        allowed[msg.sender][spender] = tokens;
        emit Approval(msg.sender, spender, tokens);
        return true;
    }
    
    function transfer(address to, uint tokens) public returns (bool success) {
        balances[msg.sender] = safeSub(balances[msg.sender], tokens);
        balances[to] = safeAdd(balances[to], tokens);
        emit Transfer(msg.sender, to, tokens);
        return true;
    }
    
    function transferFrom(address from, address to, uint tokens) public returns (bool success) {
        balances[from] = safeSub(balances[from], tokens);
        allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
        balances[to] = safeAdd(balances[to], tokens);
        emit Transfer(from, to, tokens);
        return true;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenOwner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"_totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"tokenOwner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"tokenOwner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"name":"safeAdd","outputs":[{"internalType":"uint256","name":"c","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"name":"safeDiv","outputs":[{"internalType":"uint256","name":"c","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"name":"safeMul","outputs":[{"internalType":"uint256","name":"c","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"name":"safeSub","outputs":[{"internalType":"uint256","name":"c","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5060408051808201909152601f8082527f596561726e2046696e616e6365204469616d6f6e6420546f6b656e2054776f006020909201918252610055916000916100f0565b50604080518082019091526007808252665946445454574f60c81b6020909201918252610084916001916100f0565b506002805460ff1916601217905569017b7883c069166000006003819055336000818152600460209081526040808320859055805194855251929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a361018b565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061013157805160ff191683800117855561015e565b8280016001018555821561015e579182015b8281111561015e578251825591602001919060010190610143565b5061016a92915061016e565b5090565b61018891905b8082111561016a5760008155600101610174565b90565b6107438061019a6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806395d89b411161008c578063b5931f7c11610066578063b5931f7c1461029f578063d05c78da146102c2578063dd62ed3e146102e5578063e6cb901314610313576100ea565b806395d89b4114610248578063a293d1e814610250578063a9059cbb14610273576100ea565b806323b872dd116100c857806323b872dd146101c6578063313ce567146101fc5780633eaaf86b1461021a57806370a0823114610222576100ea565b806306fdde03146100ef578063095ea7b31461016c57806318160ddd146101ac575b600080fd5b6100f7610336565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101986004803603604081101561018257600080fd5b506001600160a01b0381351690602001356103c4565b604080519115158252519081900360200190f35b6101b461042b565b60408051918252519081900360200190f35b610198600480360360608110156101dc57600080fd5b506001600160a01b0381358116916020810135909116906040013561045d565b610204610556565b6040805160ff9092168252519081900360200190f35b6101b461055f565b6101b46004803603602081101561023857600080fd5b50356001600160a01b0316610565565b6100f7610580565b6101b46004803603604081101561026657600080fd5b50803590602001356105da565b6101986004803603604081101561028957600080fd5b506001600160a01b0381351690602001356105ef565b6101b4600480360360408110156102b557600080fd5b5080359060200135610693565b6101b4600480360360408110156102d857600080fd5b50803590602001356106b2565b6101b4600480360360408110156102fb57600080fd5b506001600160a01b03813581169160200135166106d3565b6101b46004803603604081101561032957600080fd5b50803590602001356106fe565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103bc5780601f10610391576101008083540402835291602001916103bc565b820191906000526020600020905b81548152906001019060200180831161039f57829003601f168201915b505050505081565b3360008181526005602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b6000805260046020527f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec546003540390565b6001600160a01b03831660009081526004602052604081205461048090836105da565b6001600160a01b03851660009081526004602090815260408083209390935560058152828220338352905220546104b790836105da565b6001600160a01b0380861660009081526005602090815260408083203384528252808320949094559186168152600490915220546104f590836106fe565b6001600160a01b0380851660008181526004602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b60025460ff1681565b60035481565b6001600160a01b031660009081526004602052604090205490565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103bc5780601f10610391576101008083540402835291602001916103bc565b6000828211156105e957600080fd5b50900390565b3360009081526004602052604081205461060990836105da565b33600090815260046020526040808220929092556001600160a01b0385168152205461063590836106fe565b6001600160a01b0384166000818152600460209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60008082116106a157600080fd5b8183816106aa57fe5b049392505050565b8181028215806106ca5750818382816106c757fe5b04145b61042557600080fd5b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b8181018281101561042557600080fdfea265627a7a7231582007062801dc89c794c86204916605c875e89eed2a9ce8c5b78cfc29f13dd7d85d64736f6c63430005110032

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806395d89b411161008c578063b5931f7c11610066578063b5931f7c1461029f578063d05c78da146102c2578063dd62ed3e146102e5578063e6cb901314610313576100ea565b806395d89b4114610248578063a293d1e814610250578063a9059cbb14610273576100ea565b806323b872dd116100c857806323b872dd146101c6578063313ce567146101fc5780633eaaf86b1461021a57806370a0823114610222576100ea565b806306fdde03146100ef578063095ea7b31461016c57806318160ddd146101ac575b600080fd5b6100f7610336565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101986004803603604081101561018257600080fd5b506001600160a01b0381351690602001356103c4565b604080519115158252519081900360200190f35b6101b461042b565b60408051918252519081900360200190f35b610198600480360360608110156101dc57600080fd5b506001600160a01b0381358116916020810135909116906040013561045d565b610204610556565b6040805160ff9092168252519081900360200190f35b6101b461055f565b6101b46004803603602081101561023857600080fd5b50356001600160a01b0316610565565b6100f7610580565b6101b46004803603604081101561026657600080fd5b50803590602001356105da565b6101986004803603604081101561028957600080fd5b506001600160a01b0381351690602001356105ef565b6101b4600480360360408110156102b557600080fd5b5080359060200135610693565b6101b4600480360360408110156102d857600080fd5b50803590602001356106b2565b6101b4600480360360408110156102fb57600080fd5b506001600160a01b03813581169160200135166106d3565b6101b46004803603604081101561032957600080fd5b50803590602001356106fe565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103bc5780601f10610391576101008083540402835291602001916103bc565b820191906000526020600020905b81548152906001019060200180831161039f57829003601f168201915b505050505081565b3360008181526005602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b6000805260046020527f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec546003540390565b6001600160a01b03831660009081526004602052604081205461048090836105da565b6001600160a01b03851660009081526004602090815260408083209390935560058152828220338352905220546104b790836105da565b6001600160a01b0380861660009081526005602090815260408083203384528252808320949094559186168152600490915220546104f590836106fe565b6001600160a01b0380851660008181526004602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b60025460ff1681565b60035481565b6001600160a01b031660009081526004602052604090205490565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103bc5780601f10610391576101008083540402835291602001916103bc565b6000828211156105e957600080fd5b50900390565b3360009081526004602052604081205461060990836105da565b33600090815260046020526040808220929092556001600160a01b0385168152205461063590836106fe565b6001600160a01b0384166000818152600460209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60008082116106a157600080fd5b8183816106aa57fe5b049392505050565b8181028215806106ca5750818382816106c757fe5b04145b61042557600080fd5b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b8181018281101561042557600080fdfea265627a7a7231582007062801dc89c794c86204916605c875e89eed2a9ce8c5b78cfc29f13dd7d85d64736f6c63430005110032

Deployed Bytecode Sourcemap

1579:2109:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1579:2109:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1652:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1652:18:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2818:208;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2818:208:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;2403:112;;;:::i;:::-;;;;;;;;;;;;;;;;3327:358;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3327:358:0;;;;;;;;;;;;;;;;;:::i;1704:21::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1806:27;;;:::i;2527:120::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2527:120:0;-1:-1:-1;;;;;2527:120:0;;:::i;1677:20::-;;;:::i;1253:102::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1253:102:0;;;;;;;:::i;3038:277::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3038:277:0;;;;;;;;:::i;1464:106::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1464:106:0;;;;;;;:::i;1356:107::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1356:107:0;;;;;;;:::i;2659:147::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2659:147:0;;;;;;;;;;:::i;1131:116::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1131:116:0;;;;;;;:::i;1652:18::-;;;;;;;;;;;;;;;-1:-1:-1;;1652:18:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;2818:208::-;2914:10;2881:12;2906:19;;;:7;:19;;;;;;;;-1:-1:-1;;;;;2906:28:0;;;;;;;;;;;:37;;;2959;;;;;;;2881:12;;2906:28;;2914:10;;2959:37;;;;;;;;-1:-1:-1;3014:4:0;2818:208;;;;;:::o;2403:112::-;2447:4;2487:20;;:8;:20;;;;2471:12;;:36;2403:112;:::o;3327:358::-;-1:-1:-1;;;;;3454:14:0;;3404:12;3454:14;;;:8;:14;;;;;;3446:31;;3470:6;3446:7;:31::i;:::-;-1:-1:-1;;;;;3429:14:0;;;;;;:8;:14;;;;;;;;:48;;;;3524:7;:13;;;;;3538:10;3524:25;;;;;;3516:42;;3551:6;3516:7;:42::i;:::-;-1:-1:-1;;;;;3488:13:0;;;;;;;:7;:13;;;;;;;;3502:10;3488:25;;;;;;;:70;;;;3592:12;;;;;:8;:12;;;;;3584:29;;3606:6;3584:7;:29::i;:::-;-1:-1:-1;;;;;3569:12:0;;;;;;;:8;:12;;;;;;;;;:44;;;;3629:26;;;;;;;3569:12;;3629:26;;;;;;;;;;;;;-1:-1:-1;3673:4:0;3327:358;;;;;:::o;1704:21::-;;;;;;:::o;1806:27::-;;;;:::o;2527:120::-;-1:-1:-1;;;;;2619:20:0;2587:12;2619:20;;;:8;:20;;;;;;;2527:120::o;1677:20::-;;;;;;;;;;;;;;;-1:-1:-1;;1677:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1253:102;1307:6;1339:1;1334;:6;;1326:15;;;;;;-1:-1:-1;1347:5:0;;;1253:102::o;3038:277::-;3162:10;3097:12;3153:20;;;:8;:20;;;;;;3145:37;;3175:6;3145:7;:37::i;:::-;3131:10;3122:20;;;;:8;:20;;;;;;:60;;;;-1:-1:-1;;;;;3216:12:0;;;;;;3208:29;;3230:6;3208:7;:29::i;:::-;-1:-1:-1;;;;;3193:12:0;;;;;;:8;:12;;;;;;;;;:44;;;;3253:32;;;;;;;3193:12;;3262:10;;3253:32;;;;;;;;;;-1:-1:-1;3303:4:0;3038:277;;;;:::o;1464:106::-;1518:6;1540:1;1536;:5;1528:14;;;;;;1561:1;1557;:5;;;;;;;1464:106;-1:-1:-1;;;1464:106:0:o;1356:107::-;1424:5;;;1439:6;;;:20;;;1458:1;1453;1449;:5;;;;;;:10;1439:20;1431:29;;;;;2659:147;-1:-1:-1;;;;;2770:19:0;;;2736:14;2770:19;;;:7;:19;;;;;;;;:28;;;;;;;;;;;;;2659:147::o;1131:116::-;1208:5;;;1232:6;;;;1224:15;;;;

Swarm Source

bzzr://07062801dc89c794c86204916605c875e89eed2a9ce8c5b78cfc29f13dd7d85d
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.