ETH Price: $3,021.93 (-2.34%)
Gas: 11 Gwei

Contract

0x40eE175b073A1ac2A5dD02695c9A9612973C317A
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Accept Ownership197008472024-04-21 2:36:5916 days ago1713667019IN
0x40eE175b...2973C317A
0 ETH0.000169716
Nominate New Own...197007722024-04-21 2:21:5916 days ago1713666119IN
0x40eE175b...2973C317A
0 ETH0.000282156
Set Associated C...196975732024-04-20 15:39:3517 days ago1713627575IN
0x40eE175b...2973C317A
0 ETH0.000269539
Accept Ownership156741142022-10-04 10:15:47581 days ago1664878547IN
0x40eE175b...2973C317A
0 ETH0.000197997
Nominate New Own...156740352022-10-04 9:59:47581 days ago1664877587IN
0x40eE175b...2973C317A
0 ETH0.00037628
Set Associated C...150165582022-06-24 4:39:35683 days ago1656045575IN
0x40eE175b...2973C317A
0 ETH0.0008984430
Set Associated C...149298692022-06-09 1:14:20699 days ago1654737260IN
0x40eE175b...2973C317A
0 ETH0.0026953290
Set Associated C...147538482022-05-11 8:38:54727 days ago1652258334IN
0x40eE175b...2973C317A
0 ETH0.0026953290
Set Associated C...147222172022-05-06 7:25:53732 days ago1651821953IN
0x40eE175b...2973C317A
0 ETH0.001497450
Set Associated C...147220022022-05-06 6:37:52732 days ago1651819072IN
0x40eE175b...2973C317A
0 ETH0.001497450
Set Associated C...146772482022-04-29 5:05:13739 days ago1651208713IN
0x40eE175b...2973C317A
0 ETH0.0010481835
Set Associated C...130023752021-08-11 6:48:001000 days ago1628664480IN
0x40eE175b...2973C317A
0 ETH0.0017968860
Set Associated C...128058302021-07-11 11:51:351031 days ago1626004295IN
0x40eE175b...2973C317A
0 ETH0.0003294211
Set Associated C...127773412021-07-07 1:17:261036 days ago1625620646IN
0x40eE175b...2973C317A
0 ETH0.0012278641
Set Associated C...127771672021-07-07 0:36:241036 days ago1625618184IN
0x40eE175b...2973C317A
0 ETH0.0012278641
Set Associated C...127720482021-07-06 5:29:471036 days ago1625549387IN
0x40eE175b...2973C317A
0 ETH0.0002994810
Set Associated C...127660782021-07-05 7:10:061037 days ago1625469006IN
0x40eE175b...2973C317A
0 ETH0.000239588
Set Associated C...127659902021-07-05 6:53:071037 days ago1625467987IN
0x40eE175b...2973C317A
0 ETH0.0002994810
Set Associated C...123851002021-05-07 4:41:191096 days ago1620362479IN
0x40eE175b...2973C317A
0 ETH0.001377646
Set Associated C...123850152021-05-07 4:21:011096 days ago1620361261IN
0x40eE175b...2973C317A
0 ETH0.0012877643
Set Associated C...123816822021-05-06 15:59:031097 days ago1620316743IN
0x40eE175b...2973C317A
0 ETH0.0022760476
Set Associated C...123805092021-05-06 11:36:281097 days ago1620300988IN
0x40eE175b...2973C317A
0 ETH0.0017968860
Set Associated C...123802082021-05-06 10:29:351097 days ago1620296975IN
0x40eE175b...2973C317A
0 ETH0.0023958480
Set Associated C...120996742021-03-24 5:16:501140 days ago1616563010IN
0x40eE175b...2973C317A
0 ETH0.00412272140
Set Associated C...119566772021-03-02 4:33:531162 days ago1614659633IN
0x40eE175b...2973C317A
0 ETH0.00382824130
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xeD0e1947...Ea43c9a46
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
TokenState

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2021-03-02
*/

/*

* Pynths : TokenState.sol
*
*
* Contract Dependencies: 
*	- Owned
*	- State
* Libraries: (none)
*
* MIT License
* ===========
*
* Copyright (c) 2021 Pynths
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/



pragma solidity ^0.5.16;


// https://docs.pynthetix.io/contracts/source/contracts/owned
contract Owned {
    address public owner;
    address public nominatedOwner;

    constructor(address _owner) public {
        require(_owner != address(0), "Owner address cannot be 0");
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

    function nominateNewOwner(address _owner) external onlyOwner {
        nominatedOwner = _owner;
        emit OwnerNominated(_owner);
    }

    function acceptOwnership() external {
        require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership");
        emit OwnerChanged(owner, nominatedOwner);
        owner = nominatedOwner;
        nominatedOwner = address(0);
    }

    modifier onlyOwner {
        _onlyOwner();
        _;
    }

    function _onlyOwner() private view {
        require(msg.sender == owner, "Only the contract owner may perform this action");
    }

    event OwnerNominated(address newOwner);
    event OwnerChanged(address oldOwner, address newOwner);
}


// Inheritance


// https://docs.pynthetix.io/contracts/source/contracts/state
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 _associatedContract) internal {
        // This contract is abstract, and thus cannot be instantiated directly
        require(owner != address(0), "Owner must be set");

        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, "Only the associated contract can perform this action");
        _;
    }

    /* ========== EVENTS ========== */

    event AssociatedContractUpdated(address associatedContract);
}


// Inheritance


// https://docs.pynthetix.io/contracts/source/contracts/tokenstate
contract TokenState is Owned, State {
    /* ERC20 fields. */
    mapping(address => uint) public balanceOf;
    mapping(address => mapping(address => uint)) public allowance;

    constructor(address _owner, address _associatedContract) public Owned(_owner) State(_associatedContract) {}

    /* ========== 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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_associatedContract","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"associatedContract","type":"address"}],"name":"AssociatedContractUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"associatedContract","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"tokenOwner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setAllowance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_associatedContract","type":"address"}],"name":"setAssociatedContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setBalanceOf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80638da5cb5b116100665780638da5cb5b14610155578063aefc4ccb1461015d578063b46310f614610165578063da46098c14610191578063dd62ed3e146101c75761009e565b80631627540c146100a357806352f445ca146100cb57806353a47bb7146100f157806370a082311461011557806379ba50971461014d575b600080fd5b6100c9600480360360208110156100b957600080fd5b50356001600160a01b03166101f5565b005b6100c9600480360360208110156100e157600080fd5b50356001600160a01b0316610251565b6100f96102ad565b604080516001600160a01b039092168252519081900360200190f35b61013b6004803603602081101561012b57600080fd5b50356001600160a01b03166102bc565b60408051918252519081900360200190f35b6100c96102ce565b6100f961038a565b6100f9610399565b6100c96004803603604081101561017b57600080fd5b506001600160a01b0381351690602001356103a8565b6100c9600480360360608110156101a757600080fd5b506001600160a01b0381358116916020810135909116906040013561040d565b61013b600480360360408110156101dd57600080fd5b506001600160a01b0381358116916020013516610482565b6101fd61049f565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b61025961049f565b600280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f73f20cff579e8a4086fa607db83867595f1b6a798e718c0bfa0b94a404128e039181900360200190a150565b6001546001600160a01b031681565b60036020526000908152604090205481565b6001546001600160a01b031633146103175760405162461bcd60e51b81526004018080602001828103825260358152602001806104eb6035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6002546001600160a01b031681565b6002546001600160a01b031633146103f15760405162461bcd60e51b815260040180806020018281038252603481526020018061054f6034913960400191505060405180910390fd5b6001600160a01b03909116600090815260036020526040902055565b6002546001600160a01b031633146104565760405162461bcd60e51b815260040180806020018281038252603481526020018061054f6034913960400191505060405180910390fd5b6001600160a01b0392831660009081526004602090815260408083209490951682529290925291902055565b600460209081526000928352604080842090915290825290205481565b6000546001600160a01b031633146104e85760405162461bcd60e51b815260040180806020018281038252602f815260200180610520602f913960400191505060405180910390fd5b56fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e6572736869704f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e4f6e6c7920746865206173736f63696174656420636f6e74726163742063616e20706572666f726d207468697320616374696f6ea265627a7a723158203cff3aef1106cc8a038432a17129ed5652bfc5deacc0903cc206807d18aa0f6e64736f6c63430005100032

Libraries Used


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.