More Info
Private Name Tags
ContractCreator
Latest 13 from a total of 13 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer | 12706826 | 1172 days ago | IN | 0.00001 ETH | 0.00021 | ||||
Nominate New Own... | 9595797 | 1652 days ago | IN | 0 ETH | 0.00008902 | ||||
Set Associated C... | 9519083 | 1664 days ago | IN | 0 ETH | 0.00017719 | ||||
Set Associated C... | 9123732 | 1728 days ago | IN | 0 ETH | 0.00023625 | ||||
Set Associated C... | 8893341 | 1768 days ago | IN | 0 ETH | 0.0002958 | ||||
Set Associated C... | 8623261 | 1811 days ago | IN | 0 ETH | 0.00062118 | ||||
Set Associated C... | 6841213 | 2104 days ago | IN | 0 ETH | 0.0005916 | ||||
Set Associated C... | 6786536 | 2113 days ago | IN | 0 ETH | 0.0008874 | ||||
Accept Ownership | 6061276 | 2233 days ago | IN | 0 ETH | 0.00038274 | ||||
Nominate New Own... | 6044983 | 2236 days ago | IN | 0 ETH | 0.00049013 | ||||
Accept Ownership | 5873249 | 2265 days ago | IN | 0 ETH | 0.00019137 | ||||
Nominate New Own... | 5873200 | 2265 days ago | IN | 0 ETH | 0.00044558 | ||||
0x60806040 | 5872923 | 2265 days ago | IN | 0 ETH | 0.00422835 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
TokenState
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-06-29 */ /* * Nomin TokenState Contract * * Stores ERC20 balance and approval information for the * nomin component of the Havven stablecoin system. * * version: nUSDa.1 * date: 29 Jun 2018 * url: https://github.com/Havven/havven/releases/tag/nUSDa.1 */ pragma solidity 0.4.24; /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: Owned.sol version: 1.1 author: Anton Jurisevic Dominic Romanowski date: 2018-2-26 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- An Owned contract, to be inherited by other contracts. Requires its owner to be explicitly set in the constructor. Provides an onlyOwner access modifier. To change owner, the current owner must nominate the next owner, who then has to accept the nomination. The nomination can be cancelled before it is accepted by the new owner by having the previous owner change the nomination (setting it to 0). ----------------------------------------------------------------- */ /** * @title A contract with an owner. * @notice Contract ownership can be transferred by first nominating the new owner, * who must then accept the ownership, which prevents accidental incorrect ownership transfers. */ contract Owned { address public owner; address public nominatedOwner; /** * @dev Owned Constructor */ constructor(address _owner) public { require(_owner != address(0)); owner = _owner; emit OwnerChanged(address(0), _owner); } /** * @notice Nominate a new owner of this contract. * @dev Only the current owner may nominate a new owner. */ function nominateNewOwner(address _owner) external onlyOwner { nominatedOwner = _owner; emit OwnerNominated(_owner); } /** * @notice Accept the nomination to be owner. */ function acceptOwnership() external { require(msg.sender == nominatedOwner); emit OwnerChanged(owner, nominatedOwner); owner = nominatedOwner; nominatedOwner = address(0); } modifier onlyOwner { require(msg.sender == owner); _; } event OwnerNominated(address newOwner); event OwnerChanged(address oldOwner, address newOwner); } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: State.sol version: 1.1 author: Dominic Romanowski Anton Jurisevic date: 2018-05-15 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- This contract is used side by side with external state token contracts, such as Havven and Nomin. It provides an easy way to upgrade contract logic while maintaining all user balances and allowances. This is designed to make the changeover as easy as possible, since mappings are not so cheap or straightforward to migrate. The first deployed contract would create this state contract, using it as its store of balances. When a new contract is deployed, it links to the existing state contract, whose owner would then change its associated contract to the new one. ----------------------------------------------------------------- */ contract State is Owned { // the address of the contract that can modify variables // this can only be changed by the owner of this contract address public associatedContract; constructor(address _owner, address _associatedContract) Owned(_owner) public { associatedContract = _associatedContract; emit AssociatedContractUpdated(_associatedContract); } /* ========== SETTERS ========== */ // Change the associated contract to a new address function setAssociatedContract(address _associatedContract) external onlyOwner { associatedContract = _associatedContract; emit AssociatedContractUpdated(_associatedContract); } /* ========== MODIFIERS ========== */ modifier onlyAssociatedContract { require(msg.sender == associatedContract); _; } /* ========== EVENTS ========== */ event AssociatedContractUpdated(address associatedContract); } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: TokenState.sol version: 1.1 author: Dominic Romanowski Anton Jurisevic date: 2018-05-15 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- A contract that holds the state of an ERC20 compliant token. This contract is used side by side with external state token contracts, such as Havven and Nomin. It provides an easy way to upgrade contract logic while maintaining all user balances and allowances. This is designed to make the changeover as easy as possible, since mappings are not so cheap or straightforward to migrate. The first deployed contract would create this state contract, using it as its store of balances. When a new contract is deployed, it links to the existing state contract, whose owner would then change its associated contract to the new one. ----------------------------------------------------------------- */ /** * @title ERC20 Token State * @notice Stores balance information of an ERC20 token contract. */ contract TokenState is State { /* ERC20 fields. */ mapping(address => uint) public balanceOf; mapping(address => mapping(address => uint)) public allowance; /** * @dev Constructor * @param _owner The address which controls this contract. * @param _associatedContract The ERC20 contract whose state this composes. */ constructor(address _owner, address _associatedContract) State(_owner, _associatedContract) public {} /* ========== SETTERS ========== */ /** * @notice Set ERC20 allowance. * @dev Only the associated contract may call this. * @param tokenOwner The authorising party. * @param spender The authorised party. * @param value The total value the authorised party may spend on the * authorising party's behalf. */ function setAllowance(address tokenOwner, address spender, uint value) external onlyAssociatedContract { allowance[tokenOwner][spender] = value; } /** * @notice Set the balance in a given account * @dev Only the associated contract may call this. * @param account The account whose value to set. * @param value The new balance of the given account. */ function setBalanceOf(address account, uint value) external onlyAssociatedContract { balanceOf[account] = value; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_associatedContract","type":"address"}],"name":"setAssociatedContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"associatedContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"},{"name":"value","type":"uint256"}],"name":"setBalanceOf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"tokenOwner","type":"address"},{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"setAllowance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_owner","type":"address"},{"name":"_associatedContract","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"associatedContract","type":"address"}],"name":"AssociatedContractUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"}]
Contract Creation Code
608060405234801561001057600080fd5b50604051604080610587833981016040528051602090910151818181600160a060020a038116151561004157600080fd5b60008054600160a060020a031916600160a060020a038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a15060028054600160a060020a038316600160a060020a0319909116811790915560408051918252517f73f20cff579e8a4086fa607db83867595f1b6a798e718c0bfa0b94a404128e039181900360200190a150505050610489806100fe6000396000f3006080604052600436106100a35763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631627540c81146100a857806352f445ca146100cb57806353a47bb7146100ec57806370a082311461011d57806379ba5097146101505780638da5cb5b14610165578063aefc4ccb1461017a578063b46310f61461018f578063da46098c146101b3578063dd62ed3e146101dd575b600080fd5b3480156100b457600080fd5b506100c9600160a060020a0360043516610204565b005b3480156100d757600080fd5b506100c9600160a060020a036004351661027c565b3480156100f857600080fd5b506101016102f4565b60408051600160a060020a039092168252519081900360200190f35b34801561012957600080fd5b5061013e600160a060020a0360043516610303565b60408051918252519081900360200190f35b34801561015c57600080fd5b506100c9610315565b34801561017157600080fd5b506101016103ac565b34801561018657600080fd5b506101016103bb565b34801561019b57600080fd5b506100c9600160a060020a03600435166024356103ca565b3480156101bf57600080fd5b506100c9600160a060020a03600435811690602435166044356103fd565b3480156101e957600080fd5b5061013e600160a060020a0360043581169060243516610440565b600054600160a060020a0316331461021b57600080fd5b60018054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b600054600160a060020a0316331461029357600080fd5b60028054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517f73f20cff579e8a4086fa607db83867595f1b6a798e718c0bfa0b94a404128e039181900360200190a150565b600154600160a060020a031681565b60036020526000908152604090205481565b600154600160a060020a0316331461032c57600080fd5b60005460015460408051600160a060020a03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a1600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600054600160a060020a031681565b600254600160a060020a031681565b600254600160a060020a031633146103e157600080fd5b600160a060020a03909116600090815260036020526040902055565b600254600160a060020a0316331461041457600080fd5b600160a060020a0392831660009081526004602090815260408083209490951682529290925291902055565b6004602090815260009283526040808420909152908252902054815600a165627a7a72305820807f9f59125f6242ac71be1d2ad9f9bbc7315e06c29f2007d1ff49da7c790e4e0029000000000000000000000000b10c85274d2a58ddec72c1d826e75256ff93dead000000000000000000000000b10c85274d2a58ddec72c1d826e75256ff93dead
Deployed Bytecode
0x6080604052600436106100a35763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631627540c81146100a857806352f445ca146100cb57806353a47bb7146100ec57806370a082311461011d57806379ba5097146101505780638da5cb5b14610165578063aefc4ccb1461017a578063b46310f61461018f578063da46098c146101b3578063dd62ed3e146101dd575b600080fd5b3480156100b457600080fd5b506100c9600160a060020a0360043516610204565b005b3480156100d757600080fd5b506100c9600160a060020a036004351661027c565b3480156100f857600080fd5b506101016102f4565b60408051600160a060020a039092168252519081900360200190f35b34801561012957600080fd5b5061013e600160a060020a0360043516610303565b60408051918252519081900360200190f35b34801561015c57600080fd5b506100c9610315565b34801561017157600080fd5b506101016103ac565b34801561018657600080fd5b506101016103bb565b34801561019b57600080fd5b506100c9600160a060020a03600435166024356103ca565b3480156101bf57600080fd5b506100c9600160a060020a03600435811690602435166044356103fd565b3480156101e957600080fd5b5061013e600160a060020a0360043581169060243516610440565b600054600160a060020a0316331461021b57600080fd5b60018054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b600054600160a060020a0316331461029357600080fd5b60028054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517f73f20cff579e8a4086fa607db83867595f1b6a798e718c0bfa0b94a404128e039181900360200190a150565b600154600160a060020a031681565b60036020526000908152604090205481565b600154600160a060020a0316331461032c57600080fd5b60005460015460408051600160a060020a03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a1600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600054600160a060020a031681565b600254600160a060020a031681565b600254600160a060020a031633146103e157600080fd5b600160a060020a03909116600090815260036020526040902055565b600254600160a060020a0316331461041457600080fd5b600160a060020a0392831660009081526004602090815260408083209490951682529290925291902055565b6004602090815260009283526040808420909152908252902054815600a165627a7a72305820807f9f59125f6242ac71be1d2ad9f9bbc7315e06c29f2007d1ff49da7c790e4e0029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b10c85274d2a58ddec72c1d826e75256ff93dead000000000000000000000000b10c85274d2a58ddec72c1d826e75256ff93dead
-----Decoded View---------------
Arg [0] : _owner (address): 0xb10C85274d2a58dDeC72C1D826e75256fF93DEad
Arg [1] : _associatedContract (address): 0xb10C85274d2a58dDeC72C1D826e75256fF93DEad
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000b10c85274d2a58ddec72c1d826e75256ff93dead
Arg [1] : 000000000000000000000000b10c85274d2a58ddec72c1d826e75256ff93dead
Swarm Source
bzzr://807f9f59125f6242ac71be1d2ad9f9bbc7315e06c29f2007d1ff49da7c790e4e
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.