Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Finance
Overview
Max Total Supply
100,000,000 TRST
Holders
7,870 (0.00%)
Market
Price
$0.00 @ 0.000000 ETH (-1.04%)
Onchain Market Cap
$47,124.29
Circulating Supply Market Cap
$0.00
Other Info
Token Contract (WITH 6 Decimals)
Balance
0.177992 TRSTValue
$0.00 ( ~0 Eth) [0.0000%]Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Trustcoin
Compiler Version
v0.4.8+commit.60cc1668
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2017-04-18 */ /** * TRST Trustcoin contract, ERC20 compliant (see https://github.com/ethereum/EIPs/issues/20) * * Code is based on multiple sources: * https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/ERC20.sol * https://github.com/ConsenSys/Tokens/blob/master/Token_Contracts/contracts/StandardToken.sol * https://github.com/ConsenSys/Tokens/blob/master/Token_Contracts/contracts/HumanStandardToken.sol */ // Abstract contract for the full ERC 20 Token standard // https://github.com/ethereum/EIPs/issues/20 // Based on https://github.com/ConsenSys/Tokens/blob/master/Token_Contracts/contracts/Token.sol pragma solidity 0.4.8; contract ERC20TokenInterface { /// @return The total amount of tokens function totalSupply() constant returns (uint256 supply); /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant public returns (uint256 balance); /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _value) public returns (bool success); /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); /// @notice `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of tokens to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) public returns (bool success); /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) constant public returns (uint256 remaining); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Trustcoin is ERC20TokenInterface { //// Constants //// string public constant name = 'Trustcoin'; uint256 public constant decimals = 6; string public constant symbol = 'TRST'; string public constant version = 'TRST1.0'; // One hundred million coins, each divided to up to 10^decimals units. uint256 private constant totalTokens = 100000000 * (10 ** decimals); mapping (address => uint256) public balances; // (ERC20) // A mapping from an account owner to a map from approved spender to their allowances. // (see ERC20 for details about allowances). mapping (address => mapping (address => uint256)) public allowed; // (ERC20) //// Events //// event MigrationInfoSet(string newMigrationInfo); // This is to be used when migration to a new contract starts. // This string can be used for any authorative information re the migration // (e.g. address to use for migration, or URL to explain where to find more info) string public migrationInfo = ""; // The only address that can set migrationContractAddress, a secure multisig. address public migrationInfoSetter; //// Modifiers //// modifier onlyFromMigrationInfoSetter { if (msg.sender != migrationInfoSetter) { throw; } _; } //// Public functions //// function Trustcoin(address _migrationInfoSetter) { if (_migrationInfoSetter == 0) throw; migrationInfoSetter = _migrationInfoSetter; // Upon creation, all tokens belong to the deployer. balances[msg.sender] = totalTokens; } // See ERC20 function totalSupply() constant returns (uint256) { return totalTokens; } // See ERC20 // WARNING: If you call this with the address of a contract, the contract will receive the // funds, but will have no idea where they came from. Furthermore, if the contract is // not aware of TRST, the tokens will remain locked away in the contract forever. // It is always recommended to call instead compareAndApprove() (or approve()) and have the // receiving contract withdraw the money using transferFrom(). function transfer(address _to, uint256 _value) public returns (bool) { if (balances[msg.sender] >= _value) { balances[msg.sender] -= _value; balances[_to] += _value; Transfer(msg.sender, _to, _value); return true; } return false; } // See ERC20 function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value) { balances[_from] -= _value; allowed[_from][msg.sender] -= _value; balances[_to] += _value; Transfer(_from, _to, _value); return true; } return false; } // See ERC20 function balanceOf(address _owner) constant public returns (uint256) { return balances[_owner]; } // See ERC20 // NOTE: this method is vulnerable and is placed here only to follow the ERC20 standard. // Before using, please take a look at the better compareAndApprove below. function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } // A vulernability of the approve method in the ERC20 standard was identified by // Mikhail Vladimirov and Dmitry Khovratovich here: // https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM // It's better to use this method which is not susceptible to over-withdrawing by the approvee. /// @param _spender The address to approve /// @param _currentValue The previous value approved, which can be retrieved with allowance(msg.sender, _spender) /// @param _newValue The new value to approve, this will replace the _currentValue /// @return bool Whether the approval was a success (see ERC20's `approve`) function compareAndApprove(address _spender, uint256 _currentValue, uint256 _newValue) public returns(bool) { if (allowed[msg.sender][_spender] != _currentValue) { return false; } return approve(_spender, _newValue); } // See ERC20 function allowance(address _owner, address _spender) constant public returns (uint256 remaining) { return allowed[_owner][_spender]; } // Allows setting a descriptive string, which will aid any users in migrating their token // to a newer version of the contract. This field provides a kind of 'double-layer' of // authentication for any migration announcement, as it can only be set by WeTrust. /// @param _migrationInfo The information string to be stored on the contract function setMigrationInfo(string _migrationInfo) onlyFromMigrationInfoSetter public { migrationInfo = _migrationInfo; MigrationInfoSet(_migrationInfo); } // To be used if the migrationInfoSetter wishes to transfer the migrationInfoSetter // permission to a new account, e.g. because of change in personnel, a concern that account // may have been compromised etc. /// @param _newMigrationInfoSetter The address of the new Migration Info Setter function changeMigrationInfoSetter(address _newMigrationInfoSetter) onlyFromMigrationInfoSetter public { migrationInfoSetter = _newMigrationInfoSetter; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"migrationInfo","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_newMigrationInfoSetter","type":"address"}],"name":"changeMigrationInfoSetter","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","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":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balances","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"migrationInfoSetter","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowed","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_currentValue","type":"uint256"},{"name":"_newValue","type":"uint256"}],"name":"compareAndApprove","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_migrationInfo","type":"string"}],"name":"setMigrationInfo","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"_migrationInfoSetter","type":"address"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newMigrationInfo","type":"string"}],"name":"MigrationInfoSet","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"}]
Contract Creation Code
608060408190526000606081905260028054818352835160ff1916825590927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace602060018416156101000260001901909316859004601f01929092048201929190610092565b82800160010185558215610092579182015b82811115610092578251825591602001919060010190610077565b5b506100b39291505b808211156100af576000815560010161009b565b5090565b50503461000057604051602080610c6683398101604052515b600160a060020a03811615156100e157610000565b60038054600160a060020a031916600160a060020a038381169190911790915533166000908152602081905260409020655af3107a400090555b505b610b3a8061012c6000396000f300606060405236156100d55763ffffffff60e060020a60003504166306fdde0381146100da57806308f978c614610167578063095ea7b3146101f45780630bffa8b41461022457806318160ddd1461023f57806323b872dd1461025e57806327e235e314610294578063313ce567146102bf5780635271309f146102de57806354fd4d50146103075780635c6581651461039457806370a08231146103c5578063751e1079146103f057806395d89b4114610423578063a9059cbb146104b0578063ab1f7929146104e0578063dd62ed3e14610535575b610000565b34610000576100e7610566565b60408051602080825283518183015283519192839290830191850190808383821561012d575b80518252602083111561012d57601f19909201916020918201910161010d565b505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576100e761059d565b60408051602080825283518183015283519192839290830191850190808383821561012d575b80518252602083111561012d57601f19909201916020918201910161010d565b505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3461000057610210600160a060020a0360043516602435610628565b604080519115158252519081900360200190f35b346100005761023d600160a060020a0360043516610693565b005b346100005761024c6106db565b60408051918252519081900360200190f35b3461000057610210600160a060020a03600435811690602435166044356106e6565b604080519115158252519081900360200190f35b346100005761024c600160a060020a03600435166107ce565b60408051918252519081900360200190f35b346100005761024c6107e0565b60408051918252519081900360200190f35b34610000576102eb6107e5565b60408051600160a060020a039092168252519081900360200190f35b34610000576100e76107f4565b60408051602080825283518183015283519192839290830191850190808383821561012d575b80518252602083111561012d57601f19909201916020918201910161010d565b505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b346100005761024c600160a060020a036004358116906024351661082b565b60408051918252519081900360200190f35b346100005761024c600160a060020a0360043516610848565b60408051918252519081900360200190f35b3461000057610210600160a060020a0360043516602435604435610867565b604080519115158252519081900360200190f35b34610000576100e76108b1565b60408051602080825283518183015283519192839290830191850190808383821561012d575b80518252602083111561012d57601f19909201916020918201910161010d565b505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3461000057610210600160a060020a03600435166024356108e8565b604080519115158252519081900360200190f35b346100005761023d600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284375094965061097f95505050505050565b005b346100005761024c600160a060020a0360043581169060243516610ae1565b60408051918252519081900360200190f35b60408051808201909152600981527f5472757374636f696e0000000000000000000000000000000000000000000000602082015281565b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156106205780601f106105f557610100808354040283529160200191610620565b820191906000526020600020905b81548152906001019060200180831161060357829003601f168201915b505050505081565b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60035433600160a060020a039081169116146106ae57610000565b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b655af3107a40005b90565b600160a060020a0383166000908152602081905260408120548290108015906107365750600160a060020a0380851660009081526001602090815260408083203390941683529290522054829010155b156107c357600160a060020a0380851660008181526020818152604080832080548890039055600182528083203386168452825280832080548890039055938716808352828252918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060016107c7565b5060005b9392505050565b60006020819052908152604090205481565b600681565b600354600160a060020a031681565b60408051808201909152600781527f54525354312e3000000000000000000000000000000000000000000000000000602082015281565b600160209081526000928352604080842090915290825290205481565b600160a060020a0381166000908152602081905260409020545b919050565b600160a060020a033381166000908152600160209081526040808320938716835292905290812054831461089d575060006107c7565b6108a78483610628565b90505b9392505050565b60408051808201909152600481527f5452535400000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03331660009081526020819052604081205482901061097557600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a350600161068d565b5060005b92915050565b60035433600160a060020a0390811691161461099a57610000565b8060029080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106109e657805160ff1916838001178555610a13565b82800160010185558215610a13579182015b82811115610a135782518255916020019190600101906109f8565b5b50610a349291505b80821115610a305760008155600101610a1c565b5090565b50507f14fa274cf60cf17ec351674ca0666a478cd8c0e8dad97858b8d5111b5fa50ea3816040518080602001828103825283818151815260200191508051906020019080838360008314610aa3575b805182526020831115610aa357601f199092019160209182019101610a83565b505050905090810190601f168015610acf5780820380516001836020036101000a031916815260200191505b509250505060405180910390a15b5b50565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b929150505600a165627a7a72305820489dd7d5cf36a9167f27c4b5fc1de716a507db014dc96c3449957480bccff801002900000000000000000000000094d99a91f55259ed93503f8711e79d71e6e913e2
Deployed Bytecode
0x606060405236156100d55763ffffffff60e060020a60003504166306fdde0381146100da57806308f978c614610167578063095ea7b3146101f45780630bffa8b41461022457806318160ddd1461023f57806323b872dd1461025e57806327e235e314610294578063313ce567146102bf5780635271309f146102de57806354fd4d50146103075780635c6581651461039457806370a08231146103c5578063751e1079146103f057806395d89b4114610423578063a9059cbb146104b0578063ab1f7929146104e0578063dd62ed3e14610535575b610000565b34610000576100e7610566565b60408051602080825283518183015283519192839290830191850190808383821561012d575b80518252602083111561012d57601f19909201916020918201910161010d565b505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576100e761059d565b60408051602080825283518183015283519192839290830191850190808383821561012d575b80518252602083111561012d57601f19909201916020918201910161010d565b505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3461000057610210600160a060020a0360043516602435610628565b604080519115158252519081900360200190f35b346100005761023d600160a060020a0360043516610693565b005b346100005761024c6106db565b60408051918252519081900360200190f35b3461000057610210600160a060020a03600435811690602435166044356106e6565b604080519115158252519081900360200190f35b346100005761024c600160a060020a03600435166107ce565b60408051918252519081900360200190f35b346100005761024c6107e0565b60408051918252519081900360200190f35b34610000576102eb6107e5565b60408051600160a060020a039092168252519081900360200190f35b34610000576100e76107f4565b60408051602080825283518183015283519192839290830191850190808383821561012d575b80518252602083111561012d57601f19909201916020918201910161010d565b505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b346100005761024c600160a060020a036004358116906024351661082b565b60408051918252519081900360200190f35b346100005761024c600160a060020a0360043516610848565b60408051918252519081900360200190f35b3461000057610210600160a060020a0360043516602435604435610867565b604080519115158252519081900360200190f35b34610000576100e76108b1565b60408051602080825283518183015283519192839290830191850190808383821561012d575b80518252602083111561012d57601f19909201916020918201910161010d565b505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3461000057610210600160a060020a03600435166024356108e8565b604080519115158252519081900360200190f35b346100005761023d600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284375094965061097f95505050505050565b005b346100005761024c600160a060020a0360043581169060243516610ae1565b60408051918252519081900360200190f35b60408051808201909152600981527f5472757374636f696e0000000000000000000000000000000000000000000000602082015281565b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156106205780601f106105f557610100808354040283529160200191610620565b820191906000526020600020905b81548152906001019060200180831161060357829003601f168201915b505050505081565b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60035433600160a060020a039081169116146106ae57610000565b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b655af3107a40005b90565b600160a060020a0383166000908152602081905260408120548290108015906107365750600160a060020a0380851660009081526001602090815260408083203390941683529290522054829010155b156107c357600160a060020a0380851660008181526020818152604080832080548890039055600182528083203386168452825280832080548890039055938716808352828252918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060016107c7565b5060005b9392505050565b60006020819052908152604090205481565b600681565b600354600160a060020a031681565b60408051808201909152600781527f54525354312e3000000000000000000000000000000000000000000000000000602082015281565b600160209081526000928352604080842090915290825290205481565b600160a060020a0381166000908152602081905260409020545b919050565b600160a060020a033381166000908152600160209081526040808320938716835292905290812054831461089d575060006107c7565b6108a78483610628565b90505b9392505050565b60408051808201909152600481527f5452535400000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03331660009081526020819052604081205482901061097557600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a350600161068d565b5060005b92915050565b60035433600160a060020a0390811691161461099a57610000565b8060029080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106109e657805160ff1916838001178555610a13565b82800160010185558215610a13579182015b82811115610a135782518255916020019190600101906109f8565b5b50610a349291505b80821115610a305760008155600101610a1c565b5090565b50507f14fa274cf60cf17ec351674ca0666a478cd8c0e8dad97858b8d5111b5fa50ea3816040518080602001828103825283818151815260200191508051906020019080838360008314610aa3575b805182526020831115610aa357601f199092019160209182019101610a83565b505050905090810190601f168015610acf5780820380516001836020036101000a031916815260200191505b509250505060405180910390a15b5b50565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b929150505600a165627a7a72305820489dd7d5cf36a9167f27c4b5fc1de716a507db014dc96c3449957480bccff8010029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000094D99A91f55259Ed93503f8711E79D71E6e913E2
-----Decoded View---------------
Arg [0] : _migrationInfoSetter (address): 0x94D99A91f55259Ed93503f8711E79D71E6e913E2
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000094D99A91f55259Ed93503f8711E79D71E6e913E2
Swarm Source
bzzr://489dd7d5cf36a9167f27c4b5fc1de716a507db014dc96c3449957480bccff801
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.