A second, independent Golem Network Token wrapper deployed in March 2017 by the BlockSwap project.
Historical Significance
The existence of two separate GNT wrappers, five months apart and from different deployers, shows the gap in the original token was widely felt rather than a single project's inconvenience. It also illustrates a recurring hazard of the wrapper pattern: because anyone can deploy one, a single underlying asset can end up with several incompatible wrapped representations, splitting liquidity between them.
Context
By early 2017 the first generation of Ethereum token contracts was meeting a second generation of infrastructure that assumed full ERC-20 compliance. Tokens written before that assumption hardened, Golem's among them, needed an adapter. BlockSwap was one of several efforts at the time to make older tokens tradeable through contract-based venues.
Token Information
Key Facts
Description
BlockSwap Wrapped Golem Network Token (BSGNT) was deployed on 30 March 2017 and wraps the same Golem Network Token as the earlier GNTW contract. Its verified source references the Golem token address directly.
It solves the same problem: GNT provides transfer and balanceOf but no approve, transferFrom or allowance, so it cannot be moved by another contract on a holder's behalf. BSGNT issues a compliant ERC-20 claim against deposited GNT so the balance can be used with contracts that expect the full standard.
Source Verified
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Spurious Dragon Era
Continued DoS protection. State trie clearing.
Bytecode Overview
Verified Source Available
Source verified on Etherscan.
Show source code (Solidity)
pragma solidity ^0.4.8;
// ----------------------------------------------------------------------------------------------
// A collaboration between Incent and Bok :)
// Enjoy. (c) Incent Loyalty Pty Ltd, and Bok Consulting Pty Ltd 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
//config contract
contract TokenConfig {
string public constant name = "BlockSwap Wrapped Golem Network Token";
string public constant symbol = "BSGNT";
}
// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/issues/20
// matches Golem
contract GNTInterface {
// Get the total token supply
function totalSupply() constant returns (uint256 totalSupply);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) constant returns (uint256 balance);
// Send _value amount of tokens to address _to
function transfer(address _to, uint256 _value) returns (bool success);
// Triggered when tokens are transferred.
event Transfer(address indexed _from, address indexed _to, uint256 _value);
//setup decimals as defined in GNT contract
function decimals() constant returns (uint8);
}
contract BlockSwapWrapperGolemNetworkToken is TokenConfig {
//public GNT contract address
GNTInterface public gntContractAddress = GNTInterface(0xa74476443119a942de498590fe1f2454d7d4ac0d);
// Owner of this contract
address public owner;
function decimals() constant returns (uint8) {
return gntContractAddress.decimals();
}
function totalSupply() external constant returns (uint256) {
return gntContractAddress.totalSupply();
}
function balanceOf(address _owner) external constant returns (uint256) {
return gntContractAddress.balanceOf(_owner);
}
function transfer(address _to, uint256 _value) returns (bool) {
return gntContractAddress.transfer(_to, _value);
}
// Functions with this modifier can only be executed by the owner
modifier onlyOwner() {
if (msg.sender != owner) {
throw;
}
_;
}
function moveToWaves(string wavesAddress, uint256 amount) {
if (!gntContractAddress.transfer(owner, amount)) throw;
WavesTransfer(msg.sender, wavesAddress, amount);
}
event WavesTransfer(address indexed _from, string wavesAddress, uint256 amount);
}External Links
Related contracts
Pass Dao
Same eraShare ledger and proposal system for a funded working group, priced on a decaying curve.
0x09bc33...9a4acdNovember 24, 2016DoriToken
Same eraA fixed-supply token with transfers and allowance spending, deployed November 2016.
0xdbd90d...c4cb16November 25, 2016"ITT Demo 0.3.6 - Live Chain"
Same eraA fixed-supply token with transfers and third-party allowances, deployed November 2016.
0xb9a357...c293e3November 28, 2016HumanStandartTokenTC
Same eraA fixed-supply token with transfers and third-party allowances, deployed November 2016.
0x7dd73b...715250November 28, 2016INRF Test Tokens
Same eraOwner can mint and freeze, and the version label was renamed from the tutorial default.
0x74f074...abb8beNovember 30, 2016test
Same eraA token with transfers and third-party allowances, and an owner who can mint new units, deployed December 2016.
0x3cfb11...cd875bDecember 1, 2016