ETH Price: $3,507.11 (+2.72%)
Gas: 4 Gwei

Token

W-GNT (W-GNT)
 

Overview

Max Total Supply

71,743.462335775924052983 W-GNT

Holders

138

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
176.056338028169014084 W-GNT

Value
$0.00
0x72866e0fb4a66bc5e15e15e763b447b77ac30d59
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:
TokenWrapper

Compiler Version
v0.4.4+commit.4633f3de

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2016-12-07
*/

/*
   Copyright 2016 Nexus Development, LLC

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

pragma solidity ^0.4.2;

// Token standard API
// https://github.com/ethereum/EIPs/issues/20

contract ERC20Constant {
    function totalSupply() constant returns (uint supply);
    function balanceOf( address who ) constant returns (uint value);
    function allowance(address owner, address spender) constant returns (uint _allowance);
}
contract ERC20Stateful {
    function transfer( address to, uint value) returns (bool ok);
    function transferFrom( address from, address to, uint value) returns (bool ok);
    function approve(address spender, uint value) returns (bool ok);
}
contract ERC20Events {
    event Transfer(address indexed from, address indexed to, uint value);
    event Approval( address indexed owner, address indexed spender, uint value);
}
contract ERC20 is ERC20Constant, ERC20Stateful, ERC20Events {}

contract ERC20Base is ERC20
{
    mapping( address => uint ) _balances;
    mapping( address => mapping( address => uint ) ) _approvals;
    uint _supply;
    function ERC20Base( uint initial_balance ) {
        _balances[msg.sender] = initial_balance;
        _supply = initial_balance;
    }
    function totalSupply() constant returns (uint supply) {
        return _supply;
    }
    function balanceOf( address who ) constant returns (uint value) {
        return _balances[who];
    }
    function transfer( address to, uint value) returns (bool ok) {
        if( _balances[msg.sender] < value ) {
            throw;
        }
        if( !safeToAdd(_balances[to], value) ) {
            throw;
        }
        _balances[msg.sender] -= value;
        _balances[to] += value;
        Transfer( msg.sender, to, value );
        return true;
    }
    function transferFrom( address from, address to, uint value) returns (bool ok) {
        // if you don't have enough balance, throw
        if( _balances[from] < value ) {
            throw;
        }
        // if you don't have approval, throw
        if( _approvals[from][msg.sender] < value ) {
            throw;
        }
        if( !safeToAdd(_balances[to], value) ) {
            throw;
        }
        // transfer and return true
        _approvals[from][msg.sender] -= value;
        _balances[from] -= value;
        _balances[to] += value;
        Transfer( from, to, value );
        return true;
    }
    function approve(address spender, uint value) returns (bool ok) {
        _approvals[msg.sender][spender] = value;
        Approval( msg.sender, spender, value );
        return true;
    }
    function allowance(address owner, address spender) constant returns (uint _allowance) {
        return _approvals[owner][spender];
    }
    function safeToAdd(uint a, uint b) internal returns (bool) {
        return (a + b >= a);
    }
}

contract ReducedToken {
    function balanceOf(address _owner) returns (uint256);
    function transfer(address _to, uint256 _value) returns (bool);
    function migrate(uint256 _value);
}

contract DepositBrokerInterface {
    function clear();
}

contract TokenWrapperInterface is ERC20 {
    function withdraw(uint amount);

    // NO deposit, must be done via broker! Sorry!
    function createBroker() returns (DepositBrokerInterface);

    // broker contracts only - transfer to a personal broker then use `clear`
    function notifyDeposit(uint amount);

    function getBroker(address owner) returns (DepositBrokerInterface);
}

contract DepositBroker is DepositBrokerInterface {
    ReducedToken _g;
    TokenWrapperInterface _w;
    function DepositBroker( ReducedToken token ) {
        _w = TokenWrapperInterface(msg.sender);
        _g = token;
    }
    function clear() {
        var amount = _g.balanceOf(this);
        _g.transfer(_w, amount);
        _w.notifyDeposit(amount);
    }
}

contract TokenWrapperEvents {
    event LogBroker(address indexed broker);
}

// Deposits only accepted via broker!
contract TokenWrapper is ERC20Base(0), TokenWrapperInterface, TokenWrapperEvents {
    ReducedToken _unwrapped;
    mapping(address=>address) _broker2owner;
    mapping(address=>address) _owner2broker;
    function TokenWrapper( ReducedToken unwrapped) {
        _unwrapped = unwrapped;
    }
    function createBroker() returns (DepositBrokerInterface) {
        DepositBroker broker;
        if( _owner2broker[msg.sender] == address(0) ) {
            broker = new DepositBroker(_unwrapped);
            _broker2owner[broker] = msg.sender;
            _owner2broker[msg.sender] = broker;
            LogBroker(broker);
        }
        else {
            broker = DepositBroker(_owner2broker[msg.sender]);
        }
        
        return broker;
    }
    function notifyDeposit(uint amount) {
        var owner = _broker2owner[msg.sender];
        if( owner == address(0) ) {
            throw;
        }
        _balances[owner] += amount;
        _supply += amount;
    }
    function withdraw(uint amount) {
        if( _balances[msg.sender] < amount ) {
            throw;
        }
        _balances[msg.sender] -= amount;
        _supply -= amount;
        _unwrapped.transfer(msg.sender, amount);
    }
    function getBroker(address owner) returns (DepositBrokerInterface) {
        return DepositBroker(_owner2broker[msg.sender]);
    }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"ok","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"supply","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"ok","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"notifyDeposit","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"createBroker","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"balanceOf","outputs":[{"name":"value","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"ok","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"owner","type":"address"}],"name":"getBroker","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"_allowance","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"unwrapped","type":"address"}],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"broker","type":"address"}],"name":"LogBroker","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}]

60606040526040516020806108838339506080604052516000600160a060020a0333166000908152602081905260409020819055600281905550600380546c0100000000000000000000000080840204600160a060020a0319909116179055506108168061006d6000396000f3606060405236156100825760e060020a6000350463095ea7b3811461008757806318160ddd1461010057806323b872dd1461011b5780632e1a7d4d146101525780635949a8f71461018357806370620168146101b557806370a08231146102c0578063a9059cbb146102ea578063d17248811461031e578063dd62ed3e14610349575b610002565b3461000257610382600435602435600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b34610002576002545b60408051918252519081900360200190f35b3461000257610382600435602435604435600160a060020a038316600090815260208190526040812054829010156103b457610002565b3461000257610396600435600160a060020a033316600090815260208190526040902054819010156104a957610002565b3461000257610396600435600160a060020a033381166000908152600460205260409020541680151561054257610002565b3461000257600160a060020a0333811660009081526005602052604081205461039892829116151561056a57600354604051600160a060020a03909116906101f0806106268339018082600160a060020a03168152602001915050604051809103906000f0801561000257600160a060020a03808216600081815260046020908152604080832080546c010000000000000000000000003381810282900473ffffffffffffffffffffffffffffffffffffffff19938416179093559690911684526005909252808320805486880296909604959092169490941790559151929350917fde9f57f51f1a060752ee33f22ef4612db4f633d9d16d95b11c08014eb45fe6049190a26102e5565b3461000257610109600435600160a060020a0381166000908152602081905260409020545b919050565b3461000257610382600435602435600160a060020a0333166000908152602081905260408120548290101561058b57610002565b3461000257610398600435600160a060020a03338116600090815260056020526040902054166102e5565b3461000257610109600435602435600160a060020a038083166000908152600160209081526040808320938516835292905220546100fa565b604080519115158252519081900360200190f35b005b60408051600160a060020a039092168252519081900360200190f35b600160a060020a0380851660009081526001602090815260408083203390941683529290522054829010156103e857610002565b600160a060020a03831660009081526020819052604090205461041390835b808201829010156100fa565b151561041e57610002565b600160a060020a038085166000818152600160209081526040808320338616845282528083208054889003905583835282825280832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b600160a060020a03338116600081815260208181526040808320805487900390556002805487900390556003548151830184905281517fa9059cbb000000000000000000000000000000000000000000000000000000008152600481019590955260248501879052905194169363a9059cbb93604480820194918390030190829087803b156100025760325a03f1156100025750505050565b600160a060020a03166000908152602081905260409020805482019055600280549091019055565b50600160a060020a0333811660009081526005602052604090205416919050565b600160a060020a0383166000908152602081905260409020546105ae9083610407565b15156105b957610002565b600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060016100fa5660606040526040516020806101f0833950608060405251600180546c01000000000000000000000000338102819004600160a060020a0319928316179092556000805484840293909304929091169190911790555061018e806100626000396000f3606060405260e060020a600035046352efea6e811461001e575b610002565b346100025761018c6000805460408051602090810184905281517f70a0823100000000000000000000000000000000000000000000000000000000815230600160a060020a039081166004830152925192909316926370a08231926024808301939282900301818787803b156100025760325a03f11561000257505060408051805160008054600154602094850183905285517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03918216600482015260248101859052955193975016945063a9059cbb936044808201949392918390030190829087803b156100025760325a03f115610002575050604080516001547f5949a8f7000000000000000000000000000000000000000000000000000000008252600482018590529151600160a060020a039092169250635949a8f791602480830192600092919082900301818387803b156100025760325a03f1156100025750505050565b00

Deployed Bytecode

0x606060405236156100825760e060020a6000350463095ea7b3811461008757806318160ddd1461010057806323b872dd1461011b5780632e1a7d4d146101525780635949a8f71461018357806370620168146101b557806370a08231146102c0578063a9059cbb146102ea578063d17248811461031e578063dd62ed3e14610349575b610002565b3461000257610382600435602435600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b34610002576002545b60408051918252519081900360200190f35b3461000257610382600435602435604435600160a060020a038316600090815260208190526040812054829010156103b457610002565b3461000257610396600435600160a060020a033316600090815260208190526040902054819010156104a957610002565b3461000257610396600435600160a060020a033381166000908152600460205260409020541680151561054257610002565b3461000257600160a060020a0333811660009081526005602052604081205461039892829116151561056a57600354604051600160a060020a03909116906101f0806106268339018082600160a060020a03168152602001915050604051809103906000f0801561000257600160a060020a03808216600081815260046020908152604080832080546c010000000000000000000000003381810282900473ffffffffffffffffffffffffffffffffffffffff19938416179093559690911684526005909252808320805486880296909604959092169490941790559151929350917fde9f57f51f1a060752ee33f22ef4612db4f633d9d16d95b11c08014eb45fe6049190a26102e5565b3461000257610109600435600160a060020a0381166000908152602081905260409020545b919050565b3461000257610382600435602435600160a060020a0333166000908152602081905260408120548290101561058b57610002565b3461000257610398600435600160a060020a03338116600090815260056020526040902054166102e5565b3461000257610109600435602435600160a060020a038083166000908152600160209081526040808320938516835292905220546100fa565b604080519115158252519081900360200190f35b005b60408051600160a060020a039092168252519081900360200190f35b600160a060020a0380851660009081526001602090815260408083203390941683529290522054829010156103e857610002565b600160a060020a03831660009081526020819052604090205461041390835b808201829010156100fa565b151561041e57610002565b600160a060020a038085166000818152600160209081526040808320338616845282528083208054889003905583835282825280832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b600160a060020a03338116600081815260208181526040808320805487900390556002805487900390556003548151830184905281517fa9059cbb000000000000000000000000000000000000000000000000000000008152600481019590955260248501879052905194169363a9059cbb93604480820194918390030190829087803b156100025760325a03f1156100025750505050565b600160a060020a03166000908152602081905260409020805482019055600280549091019055565b50600160a060020a0333811660009081526005602052604090205416919050565b600160a060020a0383166000908152602081905260409020546105ae9083610407565b15156105b957610002565b600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060016100fa5660606040526040516020806101f0833950608060405251600180546c01000000000000000000000000338102819004600160a060020a0319928316179092556000805484840293909304929091169190911790555061018e806100626000396000f3606060405260e060020a600035046352efea6e811461001e575b610002565b346100025761018c6000805460408051602090810184905281517f70a0823100000000000000000000000000000000000000000000000000000000815230600160a060020a039081166004830152925192909316926370a08231926024808301939282900301818787803b156100025760325a03f11561000257505060408051805160008054600154602094850183905285517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03918216600482015260248101859052955193975016945063a9059cbb936044808201949392918390030190829087803b156100025760325a03f115610002575050604080516001547f5949a8f7000000000000000000000000000000000000000000000000000000008252600482018590529151600160a060020a039092169250635949a8f791602480830192600092919082900301818387803b156100025760325a03f1156100025750505050565b00

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

000000000000000000000000a74476443119a942de498590fe1f2454d7d4ac0d

-----Decoded View---------------
Arg [0] : unwrapped (address): 0xa74476443119A942dE498590Fe1f2454d7D4aC0d

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a74476443119a942de498590fe1f2454d7d4ac0d


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.