Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 7 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0xb10c85274d2a58ddec72c1d826e75256ff93deadat txn 0x7e71febc88637a21ef6be9e70260f0212bf2a654caaa6cd2513bc7c01337ff6f
 Latest 7 txns

TxHash Age From To Value [TxFee]
0x10c65e7481508576440a0999216f9f8162c3b31e1b6c039b4b7cf952b1d448255 days 16 hrs ago0xb0a23f40de7f776a4f20153e8995ed3e7d7c8487  IN   0x05a9cbe762b36632b3594da4f082340e0e5343e80 Ether0.0005916
0x9c4bebdd7ef0d5f10b8d29a909e0533b55cc49562dd843861dbe2fe11ba9143c14 days 17 hrs ago0xb0a23f40de7f776a4f20153e8995ed3e7d7c8487  IN   0x05a9cbe762b36632b3594da4f082340e0e5343e80 Ether0.0008874
0xb1500f97e7d0efde7096a0da8ae1a7648adf392558be5e16b75984c4bbd5e30b134 days 18 hrs ago0xb0a23f40de7f776a4f20153e8995ed3e7d7c8487  IN   0x05a9cbe762b36632b3594da4f082340e0e5343e80 Ether0.00038274
0x8b28193ac1bb57de5f7964ac10755af49c216187104c521c355bdf369aba3f0f137 days 11 hrs ago0xb10c85274d2a58ddec72c1d826e75256ff93dead  IN   0x05a9cbe762b36632b3594da4f082340e0e5343e80 Ether0.000490138
0x6536b5d36ebb36516475480a5fc2e3c9d32d9b79e923b090d9b8cfcfa4888149166 days 17 hrs ago0xb10c85274d2a58ddec72c1d826e75256ff93dead  IN   0x05a9cbe762b36632b3594da4f082340e0e5343e80 Ether0.00019137
0xd3b7ca4b9fcf00e996b716649d7162dc11c23160c7edd87b4c87d01cefdc1389166 days 17 hrs ago0xb10c85274d2a58ddec72c1d826e75256ff93dead  IN   0x05a9cbe762b36632b3594da4f082340e0e5343e80 Ether0.00044558
0x7e71febc88637a21ef6be9e70260f0212bf2a654caaa6cd2513bc7c01337ff6f166 days 18 hrs ago0xb10c85274d2a58ddec72c1d826e75256ff93dead  IN    Contract Creation0 Ether0.00422835
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: TokenState
Compiler Text: v0.4.24+commit.e67f0147
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

/*
 * 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 ABI  
[{"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 Switch To Opcodes View
608060405234801561001057600080fd5b50604051604080610587833981016040528051602090910151818181600160a060020a038116151561004157600080fd5b60008054600160a060020a031916600160a060020a038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a15060028054600160a060020a038316600160a060020a0319909116811790915560408051918252517f73f20cff579e8a4086fa607db83867595f1b6a798e718c0bfa0b94a404128e039181900360200190a150505050610489806100fe6000396000f3006080604052600436106100a35763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631627540c81146100a857806352f445ca146100cb57806353a47bb7146100ec57806370a082311461011d57806379ba5097146101505780638da5cb5b14610165578063aefc4ccb1461017a578063b46310f61461018f578063da46098c146101b3578063dd62ed3e146101dd575b600080fd5b3480156100b457600080fd5b506100c9600160a060020a0360043516610204565b005b3480156100d757600080fd5b506100c9600160a060020a036004351661027c565b3480156100f857600080fd5b506101016102f4565b60408051600160a060020a039092168252519081900360200190f35b34801561012957600080fd5b5061013e600160a060020a0360043516610303565b60408051918252519081900360200190f35b34801561015c57600080fd5b506100c9610315565b34801561017157600080fd5b506101016103ac565b34801561018657600080fd5b506101016103bb565b34801561019b57600080fd5b506100c9600160a060020a03600435166024356103ca565b3480156101bf57600080fd5b506100c9600160a060020a03600435811690602435166044356103fd565b3480156101e957600080fd5b5061013e600160a060020a0360043581169060243516610440565b600054600160a060020a0316331461021b57600080fd5b60018054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b600054600160a060020a0316331461029357600080fd5b60028054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517f73f20cff579e8a4086fa607db83867595f1b6a798e718c0bfa0b94a404128e039181900360200190a150565b600154600160a060020a031681565b60036020526000908152604090205481565b600154600160a060020a0316331461032c57600080fd5b60005460015460408051600160a060020a03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a1600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600054600160a060020a031681565b600254600160a060020a031681565b600254600160a060020a031633146103e157600080fd5b600160a060020a03909116600090815260036020526040902055565b600254600160a060020a0316331461041457600080fd5b600160a060020a0392831660009081526004602090815260408083209490951682529290925291902055565b6004602090815260009283526040808420909152908252902054815600a165627a7a72305820807f9f59125f6242ac71be1d2ad9f9bbc7315e06c29f2007d1ff49da7c790e4e0029000000000000000000000000b10c85274d2a58ddec72c1d826e75256ff93dead000000000000000000000000b10c85274d2a58ddec72c1d826e75256ff93dead

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

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


   Swarm Source:
bzzr://807f9f59125f6242ac71be1d2ad9f9bbc7315e06c29f2007d1ff49da7c790e4e

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.