Address Contract Partially Verified
Address
0xA7dfb33234098c66FdE44907e918DAD70a3f211c
Balance
0 ETH
Nonce
312
Code Size
4535 bytes
Creator
0x34Ca7d89...298d at tx 0x9c4aade5...d5301f
Indexed Transactions
0
Contract Bytecode
4535 bytes
0x6060604052600436106100f85763ffffffff60e060020a600035041663046672cc81146100fd57806306fdde031461012c578063095ea7b3146101b657806318160ddd146101ec57806323b872dd146102115780632e1a7d4d14610239578063313ce5671461024f5780634000aea01461027857806342966c68146102a757806358f24f3d146102bd57806366188463146102d057806370a08231146102f257806382bfefc81461031157806382dc78361461034057806395d89b4114610353578063a9059cbb14610366578063c86283c814610388578063d3d3d412146103aa578063d73dd623146103c9578063dd62ed3e146103eb575b600080fd5b341561010857600080fd5b61012a602460048035828101929101359067ffffffffffffffff903516610410565b005b341561013757600080fd5b61013f610568565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561017b578082015183820152602001610163565b50505050905090810190601f1680156101a85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101c157600080fd5b6101d8600160a060020a036004351660243561059f565b604051901515815260200160405180910390f35b34156101f757600080fd5b6101ff61063a565b60405190815260200160405180910390f35b341561021c57600080fd5b6101d8600160a060020a0360043581169060243516604435610640565b341561024457600080fd5b61012a6004356107c0565b341561025a57600080fd5b6102626107cd565b60405160ff909116815260200160405180910390f35b341561028357600080fd5b61012a60048035600160a060020a03169060248035916044359182019101356107d2565b34156102b257600080fd5b61012a600435610870565b34156102c857600080fd5b61012a610969565b34156102db57600080fd5b6101d8600160a060020a0360043516602435610ab2565b34156102fd57600080fd5b6101ff600160a060020a0360043516610bac565b341561031c57600080fd5b610324610bc7565b604051600160a060020a03909116815260200160405180910390f35b341561034b57600080fd5b61012a610bd6565b341561035e57600080fd5b61013f610cb0565b341561037157600080fd5b6101d8600160a060020a0360043516602435610ce7565b341561039357600080fd5b61012a600435600160a060020a0360243516610df9565b34156103b557600080fd5b610324600160a060020a0360043516610e96565b34156103d457600080fd5b6101d8600160a060020a0360043516602435610eb4565b34156103f657600080fd5b6101ff600160a060020a0360043581169060243516610f58565b60008080808067ffffffffffffffff861642101561042d57600080fd5b600160a060020a033316600090815260208190526040812054955093505b868410156105435787878581811061045f57fe5b6020029190910135935083925050600160a060020a03821615801590610497575033600160a060020a031682600160a060020a031614155b15156104a257600080fd5b50740100000000000000000000000000000000000000008204848111156104c857600080fd5b600160a060020a0380831660008181526020819052604090819020805485019055968390039690913316907f24310ec9df46c171fe9c6d6fe25cac6781e7fa8f153f8f72ce63037a4b38c4b69084908a905191825267ffffffffffffffff1660208201526040908101905180910390a383600101935061044b565b505050600160a060020a03331660009081526020819052604090209190915550505050565b60408051908101604052601c81527f476f6c656d204e6574776f726b20546f6b656e204261746368696e6700000000602082015281565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054156105d157600080fd5b600160a060020a03338116600081815260026020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015490565b6000600160a060020a038316151561065757600080fd5b600160a060020a03841660009081526020819052604090205482111561067c57600080fd5b600160a060020a03808516600090815260026020908152604080832033909416835292905220548211156106af57600080fd5b600160a060020a0384166000908152602081905260409020546106d8908363ffffffff610f8316565b600160a060020a03808616600090815260208190526040808220939093559085168152205461070d908363ffffffff610f9516565b600160a060020a0380851660009081526020818152604080832094909455878316825260028152838220339093168252919091522054610753908363ffffffff610f8316565b600160a060020a03808616600081815260026020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b6107ca8133610df9565b50565b601281565b6107dc8484610ce7565b5083600160a060020a031663bed255423385858560405160e060020a63ffffffff8716028152600160a060020a0385166004820190815260248201859052606060448301908152606483018490529091608401848480828437820191505095505050505050600060405180830381600087803b151561085a57600080fd5b5af1151561086757600080fd5b50505050505050565b600160a060020a03331660009081526020819052604081205482111561089557600080fd5b5033600160a060020a0381166000908152602081905260409020546108ba9083610f83565b600160a060020a0382166000908152602081905260409020556001546108e6908363ffffffff610f8316565b600155600160a060020a0381167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58360405190815260200160405180910390a26000600160a060020a0382167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a35050565b33600160a060020a038181166000908152600460205260408120549091169081151561099457600080fd5b600354600160a060020a03166370a082318360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156109e457600080fd5b5af115156109f157600080fd5b5050506040518051915050600160a060020a03821663fcbd27318260405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b1515610a4257600080fd5b5af11515610a4f57600080fd5b5050600180548301905550600160a060020a038316600081815260208190526040908190208054840190557f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859083905190815260200160405180910390a2505050565b600160a060020a03338116600090815260026020908152604080832093861683529290529081205480831115610b0f57600160a060020a033381166000908152600260209081526040808320938816835292905290812055610b46565b610b1f818463ffffffff610f8316565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031681565b33600160a060020a0381811660009081526004602052604081205490911615610bfe57600080fd5b600354600160a060020a031630610c13610fab565b600160a060020a0392831681529116602082015260409081019051809103906000f0801515610c4157600080fd5b600160a060020a0383811660008181526004602052604090819020805473ffffffffffffffffffffffffffffffffffffffff19169385169384179055929350917fcada91623f6681be482bf9d09527e3733dd80cbae15a9a4b43ba3a667a315e78905160405180910390a35050565b60408051908101604052600481527f474e544200000000000000000000000000000000000000000000000000000000602082015281565b6000600160a060020a0383161515610cfe57600080fd5b600160a060020a033316600090815260208190526040902054821115610d2357600080fd5b600160a060020a033316600090815260208190526040902054610d4c908363ffffffff610f8316565b600160a060020a033381166000908152602081905260408082209390935590851681522054610d81908363ffffffff610f9516565b60008085600160a060020a0316600160a060020a031681526020019081526020016000208190555082600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b600082118015610e115750600160a060020a03811615155b1515610e1c57600080fd5b610e2582610870565b600354600160a060020a031663a9059cbb828460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610e7b57600080fd5b5af11515610e8857600080fd5b505050604051805150505050565b600160a060020a039081166000908152600460205260409020541690565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610eec908363ffffffff610f9516565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600082821115610f8f57fe5b50900390565b600082820183811015610fa457fe5b9392505050565b6040516101d080610fbc8339019056006060604052341561000f57600080fd5b6040516040806101d0833981016040528080519190602001805160008054600160a060020a03958616600160a060020a031991821617909155600180549590921694169390931790925550506101668061006a6000396000f3006060604052600436106100405763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663fcbd27318114610045575b600080fd5b341561005057600080fd5b61005b60043561005d565b005b6001543373ffffffffffffffffffffffffffffffffffffffff90811691161461008557600080fd5b60005460015473ffffffffffffffffffffffffffffffffffffffff9182169163a9059cbb9116836040517c010000000000000000000000000000000000000000000000000000000063ffffffff851602815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401602060405180830381600087803b151561011557600080fd5b5af1151561012257600080fd5b50505060405180519050151561013757600080fd5b505600a165627a7a723058205ad62f4502a9a43c35a493443dbcc9ba7a1af2d394840b726aa7858be045c0d80029a165627a7a72305820b0ee0e6efdddb6eaaa8003e198f0ea8d6f42f82702184338610162b24b0cd5f20029
Verified Source Code Partial Match
Compiler: v0.4.21+commit.dfe3193c
EVM: byzantium
Optimization: Yes (200 runs)
GolemNetworkTokenBatching.sol 343 lines
pragma solidity ^0.4.21;
contract ReceivingContract {
function onTokenReceived(address _from, uint _value, bytes _data) public;
}
contract Gate {
ERC20Basic private TOKEN;
address private PROXY;
/// Gates are to be created by the TokenProxy.
function Gate(ERC20Basic _token, address _proxy) public {
TOKEN = _token;
PROXY = _proxy;
}
/// Transfer requested amount of tokens from Gate to Proxy address.
/// Only the Proxy can request this and should request transfer of all
/// tokens.
function transferToProxy(uint256 _value) public {
require(msg.sender == PROXY);
require(TOKEN.transfer(PROXY, _value));
}
}
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
return true;
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256 balance) {
return balances[_owner];
}
}
contract BurnableToken is BasicToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
require(_value <= balances[msg.sender]);
// no need to require value <= totalSupply, since that would imply the
// sender's balance is greater than the totalSupply, which *should* be an assertion failure
address burner = msg.sender;
balances[burner] = balances[burner].sub(_value);
totalSupply_ = totalSupply_.sub(_value);
emit Burn(burner, _value);
emit Transfer(burner, address(0), _value);
}
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @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
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
emit Transfer(_from, _to, _value);
return true;
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
require(allowed[msg.sender][_spender] == 0);
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
return allowed[_owner][_spender];
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
}
contract TokenProxy is StandardToken, BurnableToken {
ERC20Basic public TOKEN;
mapping(address => address) private gates;
event GateOpened(address indexed gate, address indexed user);
event Mint(address indexed to, uint256 amount);
function TokenProxy(ERC20Basic _token) public {
TOKEN = _token;
}
function getGateAddress(address _user) external view returns (address) {
return gates[_user];
}
/// Create a new migration Gate for the User.
function openGate() external {
address user = msg.sender;
// Do not allow creating more than one Gate per User.
require(gates[user] == 0);
// Create new Gate.
address gate = new Gate(TOKEN, this);
// Remember User - Gate relationship.
gates[user] = gate;
emit GateOpened(gate, user);
}
function transferFromGate() external {
address user = msg.sender;
address gate = gates[user];
// Make sure the User's Gate exists.
require(gate != 0);
uint256 value = TOKEN.balanceOf(gate);
Gate(gate).transferToProxy(value);
// Handle the information about the amount of migrated tokens.
// This is a trusted information becase it comes from the Gate.
totalSupply_ += value;
balances[user] += value;
emit Mint(user, value);
}
function withdraw(uint256 _value) external {
withdrawTo(_value, msg.sender);
}
function withdrawTo(uint256 _value, address _destination) public {
require(_value > 0 && _destination != address(0));
burn(_value);
TOKEN.transfer(_destination, _value);
}
}
contract GolemNetworkTokenBatching is TokenProxy {
string public constant name = "Golem Network Token Batching";
string public constant symbol = "GNTB";
uint8 public constant decimals = 18;
event BatchTransfer(address indexed from, address indexed to, uint256 value,
uint64 closureTime);
function GolemNetworkTokenBatching(ERC20Basic _gntToken) TokenProxy(_gntToken) public {
}
function batchTransfer(bytes32[] payments, uint64 closureTime) external {
require(block.timestamp >= closureTime);
uint balance = balances[msg.sender];
for (uint i = 0; i < payments.length; ++i) {
// A payment contains compressed data:
// first 96 bits (12 bytes) is a value,
// following 160 bits (20 bytes) is an address.
bytes32 payment = payments[i];
address addr = address(payment);
require(addr != address(0) && addr != msg.sender);
uint v = uint(payment) / 2**160;
require(v <= balance);
balances[addr] += v;
balance -= v;
emit BatchTransfer(msg.sender, addr, v, closureTime);
}
balances[msg.sender] = balance;
}
function transferAndCall(address to, uint256 value, bytes data) external {
// Transfer always returns true so no need to check return value
transfer(to, value);
// No need to check whether recipient is a contract, this method is
// supposed to used only with contract recipients
ReceivingContract(to).onTokenReceived(msg.sender, value, data);
}
}
Read Contract
TOKEN 0x82bfefc8 → address
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
getGateAddress 0xd3d3d412 → address
name 0x06fdde03 → string
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 12 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
batchTransfer 0x046672cc
bytes32[] payments
uint64 closureTime
burn 0x42966c68
uint256 _value
decreaseApproval 0x66188463
address _spender
uint256 _subtractedValue
returns: bool
increaseApproval 0xd73dd623
address _spender
uint256 _addedValue
returns: bool
openGate 0x82dc7836
No parameters
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferAndCall 0x4000aea0
address to
uint256 value
bytes data
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
transferFromGate 0x58f24f3d
No parameters
withdraw 0x2e1a7d4d
uint256 _value
withdrawTo 0xc86283c8
uint256 _value
address _destination
Recent Transactions
No transactions found for this address