Contract Address Details

0xca2503482e5D6D762b524978f400f03E38d5F962

Token
Wrapped CRO (WCRO)
Creator
0xd1d629–03ad20 at 0xc83894–83bdb8
Balance
43,795.209058591736877895 CRO ( )
Tokens
Fetching tokens...
Transactions
356 Transactions
Transfers
3 Transfers
Gas Used
8,731,953
Last Balance Update
5899286
Contract name:
WCRO




Optimization enabled
false
Compiler version
v0.8.3+commit.8d00100c




EVM Version
default




Verified at
2021-11-29T22:43:28.132976Z

Contract source code

// SPDX-License-Identifier: GNU GENERAL PUBLIC LICENSE V3
pragma solidity =0.8.3;

contract WCRO {
    string public name     = "Wrapped CRO";
    string public symbol   = "WCRO";
    uint8  public decimals = 18;

    event  Approval(address indexed src, address indexed guy, uint wad);
    event  Transfer(address indexed src, address indexed dst, uint wad);
    event  Deposit(address indexed dst, uint wad);
    event  Withdrawal(address indexed src, uint wad);

    mapping (address => uint)                       public  balanceOf;
    mapping (address => mapping (address => uint))  public  allowance;

    receive() external payable {
        deposit();
    }

    function deposit() public payable {
        balanceOf[msg.sender] += msg.value;
        emit Deposit(msg.sender, msg.value);
    }

    function withdraw(uint wad) public {
        require(balanceOf[msg.sender] >= wad);
        balanceOf[msg.sender] -= wad;
        payable(msg.sender).transfer(wad);
        emit Withdrawal(msg.sender, wad);
    }

    function totalSupply() public view returns (uint) {
        return address(this).balance;
    }

    function approve(address guy, uint wad) public returns (bool) {
        allowance[msg.sender][guy] = wad;
        emit Approval(msg.sender, guy, wad);
        return true;
    }

    function transfer(address dst, uint wad) public returns (bool) {
        return transferFrom(msg.sender, dst, wad);
    }

    function transferFrom(address src, address dst, uint wad)
    public
    returns (bool)
    {
        require(balanceOf[src] >= wad);

        if (src != msg.sender && allowance[src][msg.sender] != type(uint).max) {
            require(allowance[src][msg.sender] >= wad);
            allowance[src][msg.sender] -= wad;
        }

        balanceOf[src] -= wad;
        balanceOf[dst] += wad;

        emit Transfer(src, dst, wad);

        return true;
    }
}


        

Contract ABI

[{"type":"event","name":"Approval","inputs":[{"type":"address","name":"src","internalType":"address","indexed":true},{"type":"address","name":"guy","internalType":"address","indexed":true},{"type":"uint256","name":"wad","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Deposit","inputs":[{"type":"address","name":"dst","internalType":"address","indexed":true},{"type":"uint256","name":"wad","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"src","internalType":"address","indexed":true},{"type":"address","name":"dst","internalType":"address","indexed":true},{"type":"uint256","name":"wad","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Withdrawal","inputs":[{"type":"address","name":"src","internalType":"address","indexed":true},{"type":"uint256","name":"wad","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"guy","internalType":"address"},{"type":"uint256","name":"wad","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"deposit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"dst","internalType":"address"},{"type":"uint256","name":"wad","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"src","internalType":"address"},{"type":"address","name":"dst","internalType":"address"},{"type":"uint256","name":"wad","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"wad","internalType":"uint256"}]},{"type":"receive","stateMutability":"payable"}]
            

Deployed ByteCode

0x6080604052600436106100a05760003560e01c8063313ce56711610064578063313ce567146101ad57806370a08231146101d857806395d89b4114610215578063a9059cbb14610240578063d0e30db01461027d578063dd62ed3e14610287576100af565b806306fdde03146100b4578063095ea7b3146100df57806318160ddd1461011c57806323b872dd146101475780632e1a7d4d14610184576100af565b366100af576100ad6102c4565b005b600080fd5b3480156100c057600080fd5b506100c961036a565b6040516100d69190610c47565b60405180910390f35b3480156100eb57600080fd5b5061010660048036038101906101019190610b61565b6103f8565b6040516101139190610c2c565b60405180910390f35b34801561012857600080fd5b506101316104ea565b60405161013e9190610c69565b60405180910390f35b34801561015357600080fd5b5061016e60048036038101906101699190610b12565b6104f2565b60405161017b9190610c2c565b60405180910390f35b34801561019057600080fd5b506101ab60048036038101906101a69190610b9d565b610856565b005b3480156101b957600080fd5b506101c2610990565b6040516101cf9190610c84565b60405180910390f35b3480156101e457600080fd5b506101ff60048036038101906101fa9190610aad565b6109a3565b60405161020c9190610c69565b60405180910390f35b34801561022157600080fd5b5061022a6109bb565b6040516102379190610c47565b60405180910390f35b34801561024c57600080fd5b5061026760048036038101906102629190610b61565b610a49565b6040516102749190610c2c565b60405180910390f35b6102856102c4565b005b34801561029357600080fd5b506102ae60048036038101906102a99190610ad6565b610a5e565b6040516102bb9190610c69565b60405180910390f35b34600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546103139190610cbb565b925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040516103609190610c69565b60405180910390a2565b6000805461037790610dcd565b80601f01602080910402602001604051908101604052809291908181526020018280546103a390610dcd565b80156103f05780601f106103c5576101008083540402835291602001916103f0565b820191906000526020600020905b8154815290600101906020018083116103d357829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516104d89190610c69565b60405180910390a36001905092915050565b600047905090565b600081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561054057600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561061857507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b1561073a5781600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156106a657600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546107329190610d11565b925050819055505b81600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546107899190610d11565b9250508190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546107df9190610cbb565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516108439190610c69565b60405180910390a3600190509392505050565b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156108a257600080fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546108f19190610d11565b925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561093e573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040516109859190610c69565b60405180910390a250565b600260009054906101000a900460ff1681565b60036020528060005260406000206000915090505481565b600180546109c890610dcd565b80601f01602080910402602001604051908101604052809291908181526020018280546109f490610dcd565b8015610a415780601f10610a1657610100808354040283529160200191610a41565b820191906000526020600020905b815481529060010190602001808311610a2457829003601f168201915b505050505081565b6000610a563384846104f2565b905092915050565b6004602052816000526040600020602052806000526040600020600091509150505481565b600081359050610a9281610e6e565b92915050565b600081359050610aa781610e85565b92915050565b600060208284031215610abf57600080fd5b6000610acd84828501610a83565b91505092915050565b60008060408385031215610ae957600080fd5b6000610af785828601610a83565b9250506020610b0885828601610a83565b9150509250929050565b600080600060608486031215610b2757600080fd5b6000610b3586828701610a83565b9350506020610b4686828701610a83565b9250506040610b5786828701610a98565b9150509250925092565b60008060408385031215610b7457600080fd5b6000610b8285828601610a83565b9250506020610b9385828601610a98565b9150509250929050565b600060208284031215610baf57600080fd5b6000610bbd84828501610a98565b91505092915050565b610bcf81610d57565b82525050565b6000610be082610c9f565b610bea8185610caa565b9350610bfa818560208601610d9a565b610c0381610e5d565b840191505092915050565b610c1781610d83565b82525050565b610c2681610d8d565b82525050565b6000602082019050610c416000830184610bc6565b92915050565b60006020820190508181036000830152610c618184610bd5565b905092915050565b6000602082019050610c7e6000830184610c0e565b92915050565b6000602082019050610c996000830184610c1d565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610cc682610d83565b9150610cd183610d83565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610d0657610d05610dff565b5b828201905092915050565b6000610d1c82610d83565b9150610d2783610d83565b925082821015610d3a57610d39610dff565b5b828203905092915050565b6000610d5082610d63565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015610db8578082015181840152602081019050610d9d565b83811115610dc7576000848401525b50505050565b60006002820490506001821680610de557607f821691505b60208210811415610df957610df8610e2e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b610e7781610d45565b8114610e8257600080fd5b50565b610e8e81610d83565b8114610e9957600080fd5b5056fea264697066735822122031e9c98e51d246e77ad81a53f2f42b6059da65b8382c902b9d4c73c73fcf77bf64736f6c63430008030033