ETH Price: $2,110.77 (+1.57%)

Contract

0x44Dfd4DB51F26C623644ac5e8A9C037C83d6FFD9
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Accept Ownership200261562024-06-05 14:14:23648 days ago1717596863IN
0x44Dfd4DB...C83d6FFD9
0 ETH0.0013450827.48147649
Nominate New Own...200261502024-06-05 14:13:11648 days ago1717596791IN
0x44Dfd4DB...C83d6FFD9
0 ETH0.0012169226.35230809

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

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

Contract Name:
FinalizableGpsFactAdapter

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Apache-2.0 license

Contract Source Code (Solidity Standard Json-Input format)

/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;

import "./Finalizable.sol";
import "./GpsFactRegistryAdapter.sol";
import "../interfaces/IQueryableFactRegistry.sol";

/**
  A finalizable version of GpsFactRegistryAdapter.
  It allows resetting the gps program hash, until finalized.
*/
contract FinalizableGpsFactAdapter is GpsFactRegistryAdapter, Finalizable {
    constructor(IQueryableFactRegistry gpsStatementContract, uint256 programHash_)
        public
        GpsFactRegistryAdapter(gpsStatementContract, programHash_)
    {}

    function setProgramHash(uint256 newProgramHash) external notFinalized onlyAdmin {
        programHash = newProgramHash;
    }

    function identify() external pure override returns (string memory) {
        return "StarkWare_FinalizableGpsFactAdapter_2022_1";
    }
}

/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;
import "../interfaces/SimpleAdminable.sol";

/**
  A simple base class for finalizable contracts.
*/
abstract contract Finalizable is SimpleAdminable {
    event Finalized();

    bool finalized;

    function isFinalized() public view returns (bool) {
        return finalized;
    }

    modifier notFinalized() {
        require(!isFinalized(), "FINALIZED");
        _;
    }

    function finalize() external onlyAdmin notFinalized {
        finalized = true;
        emit Finalized();
    }
}

/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;

import "../interfaces/Identity.sol";
import "../interfaces/IQueryableFactRegistry.sol";

/*
  The GpsFactRegistryAdapter contract is used as an adapter between a Dapp contract and a GPS fact
  registry. An isValid(fact) query is answered by querying the GPS contract about
  new_fact := keccak256(programHash, fact).

  The goal of this contract is to simplify the verifier upgradability logic in the Dapp contract
  by making the upgrade flow the same regardless of whether the update is to the program hash or
  the gpsContractAddress.
*/
contract GpsFactRegistryAdapter is IQueryableFactRegistry, Identity {
    IQueryableFactRegistry public gpsContract;
    uint256 public programHash;

    constructor(IQueryableFactRegistry gpsStatementContract, uint256 programHash_) public {
        gpsContract = gpsStatementContract;
        programHash = programHash_;
    }

    function identify() external pure virtual override returns (string memory) {
        return "StarkWare_GpsFactRegistryAdapter_2020_1";
    }

    /*
      Checks if a fact has been verified.
    */
    function isValid(bytes32 fact) external view override returns (bool) {
        return gpsContract.isValid(keccak256(abi.encode(programHash, fact)));
    }

    /*
      Indicates whether at least one fact was registered.
    */
    function hasRegisteredFact() external view override returns (bool) {
        return gpsContract.hasRegisteredFact();
    }
}

/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity >=0.6.12;

/*
  The Fact Registry design pattern is a way to separate cryptographic verification from the
  business logic of the contract flow.

  A fact registry holds a hash table of verified "facts" which are represented by a hash of claims
  that the registry hash check and found valid. This table may be queried by accessing the
  isValid() function of the registry with a given hash.

  In addition, each fact registry exposes a registry specific function for submitting new claims
  together with their proofs. The information submitted varies from one registry to the other
  depending of the type of fact requiring verification.

  For further reading on the Fact Registry design pattern see this
  `StarkWare blog post <https://medium.com/starkware/the-fact-registry-a64aafb598b6>`_.
*/
interface IFactRegistry {
    /*
      Returns true if the given fact was previously registered in the contract.
    */
    function isValid(bytes32 fact) external view returns (bool);
}

/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;

import "./IFactRegistry.sol";

/*
  Extends the IFactRegistry interface with a query method that indicates
  whether the fact registry has successfully registered any fact or is still empty of such facts.
*/
interface IQueryableFactRegistry is IFactRegistry {
    /*
      Returns true if at least one fact has been registered.
    */
    function hasRegisteredFact() external view returns (bool);
}

File 6 of 7 : Identity.sol
/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity >=0.6.12;

interface Identity {
    /*
      Allows a caller to ensure that the provided address is of the expected type and version.
    */
    function identify() external pure returns (string memory);
}

/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;

abstract contract SimpleAdminable {
    address owner;
    address ownerCandidate;
    mapping(address => bool) admins;

    constructor() internal {
        owner = msg.sender;
        admins[msg.sender] = true;
    }

    // Admin/Owner Modifiers.
    modifier onlyOwner() {
        require(isOwner(msg.sender), "ONLY_OWNER");
        _;
    }

    function isOwner(address testedAddress) public view returns (bool) {
        return owner == testedAddress;
    }

    modifier onlyAdmin() {
        require(isAdmin(msg.sender), "ONLY_ADMIN");
        _;
    }

    function isAdmin(address testedAddress) public view returns (bool) {
        return admins[testedAddress];
    }

    function registerAdmin(address newAdmin) external onlyOwner {
        if (!isAdmin(newAdmin)) {
            admins[newAdmin] = true;
        }
    }

    function removeAdmin(address removedAdmin) external onlyOwner {
        require(!isOwner(removedAdmin), "OWNER_CANNOT_BE_REMOVED_AS_ADMIN");
        delete admins[removedAdmin];
    }

    function nominateNewOwner(address newOwner) external onlyOwner {
        require(!isOwner(newOwner), "ALREADY_OWNER");
        ownerCandidate = newOwner;
    }

    function acceptOwnership() external {
        // Previous owner is still an admin.
        require(msg.sender == ownerCandidate, "NOT_A_CANDIDATE");
        owner = ownerCandidate;
        admins[ownerCandidate] = true;
        ownerCandidate = address(0x0);
    }
}

Settings
{
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {},
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IQueryableFactRegistry","name":"gpsStatementContract","type":"address"},{"internalType":"uint256","name":"programHash_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[],"name":"Finalized","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finalize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gpsContract","outputs":[{"internalType":"contract IQueryableFactRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hasRegisteredFact","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"identify","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"testedAddress","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isFinalized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"testedAddress","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"fact","type":"bytes32"}],"name":"isValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"programHash","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"registerAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"removedAdmin","type":"address"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newProgramHash","type":"uint256"}],"name":"setProgramHash","outputs":[],"stateMutability":"nonpayable","type":"function"}]

0x608060405234801561001057600080fd5b5060405161093f38038061093f8339818101604052604081101561003357600080fd5b508051602091820151600080546001600160a01b039093166001600160a01b031993841617815560019182556002805490931633908117909355918252600490925260409020805460ff191690911790556108ac806100936000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806379ba50971161008c578063c38c581311610066578063c38c581314610210578063d6354e1514610236578063e87e73321461023e578063eeb728661461025b576100ea565b806379ba5097146101e65780638a9bf090146101ee5780638d4e408314610208576100ea565b80632f54bf6e116100c85780632f54bf6e146101775780634bb278f31461019d57806351447a72146101a55780636a938567146101c9576100ea565b80631627540c146100ef5780631785f53c1461011757806324d7806c1461013d575b600080fd5b6101156004803603602081101561010557600080fd5b50356001600160a01b03166102d8565b005b6101156004803603602081101561012d57600080fd5b50356001600160a01b031661038c565b6101636004803603602081101561015357600080fd5b50356001600160a01b031661044f565b604080519115158252519081900360200190f35b6101636004803603602081101561018d57600080fd5b50356001600160a01b031661046d565b610115610481565b6101ad610546565b604080516001600160a01b039092168252519081900360200190f35b610163600480360360208110156101df57600080fd5b5035610555565b6101156105fb565b6101f6610690565b60408051918252519081900360200190f35b610163610696565b6101156004803603602081101561022657600080fd5b50356001600160a01b031661069f565b61016361071a565b6101156004803603602081101561025457600080fd5b503561079a565b61026361082c565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561029d578181015183820152602001610285565b50505050905090810190601f1680156102ca5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102e13361046d565b61031f576040805162461bcd60e51b815260206004820152600a60248201526927a7262cafa7aba722a960b11b604482015290519081900360640190fd5b6103288161046d565b1561036a576040805162461bcd60e51b815260206004820152600d60248201526c20a62922a0a22cafa7aba722a960991b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6103953361046d565b6103d3576040805162461bcd60e51b815260206004820152600a60248201526927a7262cafa7aba722a960b11b604482015290519081900360640190fd5b6103dc8161046d565b1561042e576040805162461bcd60e51b815260206004820181905260248201527f4f574e45525f43414e4e4f545f42455f52454d4f5645445f41535f41444d494e604482015290519081900360640190fd5b6001600160a01b03166000908152600460205260409020805460ff19169055565b6001600160a01b031660009081526004602052604090205460ff1690565b6002546001600160a01b0391821691161490565b61048a3361044f565b6104c8576040805162461bcd60e51b815260206004820152600a60248201526927a7262cafa0a226a4a760b11b604482015290519081900360640190fd5b6104d0610696565b1561050e576040805162461bcd60e51b815260206004820152600960248201526811925390531256915160ba1b604482015290519081900360640190fd5b6005805460ff191660011790556040517f6823b073d48d6e3a7d385eeb601452d680e74bb46afe3255a7d778f3a9b1768190600090a1565b6000546001600160a01b031681565b600080546001546040805160208082019390935280820186905281518082038301815260608201808452815191850191909120636a93856760e01b909152606482015290516001600160a01b0390931692636a93856792608480840193919291829003018186803b1580156105c957600080fd5b505afa1580156105dd573d6000803e3d6000fd5b505050506040513d60208110156105f357600080fd5b505192915050565b6003546001600160a01b0316331461064c576040805162461bcd60e51b815260206004820152600f60248201526e4e4f545f415f43414e44494441544560881b604482015290519081900360640190fd5b60038054600280546001600160a01b039092166001600160a01b031992831681179091556000908152600460205260409020805460ff191660011790558154169055565b60015481565b60055460ff1690565b6106a83361046d565b6106e6576040805162461bcd60e51b815260206004820152600a60248201526927a7262cafa7aba722a960b11b604482015290519081900360640190fd5b6106ef8161044f565b610717576001600160a01b0381166000908152600460205260409020805460ff191660011790555b50565b60008060009054906101000a90046001600160a01b03166001600160a01b031663d6354e156040518163ffffffff1660e01b815260040160206040518083038186803b15801561076957600080fd5b505afa15801561077d573d6000803e3d6000fd5b505050506040513d602081101561079357600080fd5b5051905090565b6107a2610696565b156107e0576040805162461bcd60e51b815260206004820152600960248201526811925390531256915160ba1b604482015290519081900360640190fd5b6107e93361044f565b610827576040805162461bcd60e51b815260206004820152600a60248201526927a7262cafa0a226a4a760b11b604482015290519081900360640190fd5b600155565b60606040518060600160405280602a815260200161084d602a913990509056fe537461726b576172655f46696e616c697a61626c6547707346616374416461707465725f323032325f31a264697066735822122019135242635f15232d0f14abc20641040dae3185d6cfa9c0815bb9d65fd91fed64736f6c634300060c003300000000000000000000000047312450b3ac8b5b8e247a6bb6d523e7605bdb6001b40021cbe547dc19f55932fb9e92bd930917978c6b82cfe2cc1516e47407b2

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806379ba50971161008c578063c38c581311610066578063c38c581314610210578063d6354e1514610236578063e87e73321461023e578063eeb728661461025b576100ea565b806379ba5097146101e65780638a9bf090146101ee5780638d4e408314610208576100ea565b80632f54bf6e116100c85780632f54bf6e146101775780634bb278f31461019d57806351447a72146101a55780636a938567146101c9576100ea565b80631627540c146100ef5780631785f53c1461011757806324d7806c1461013d575b600080fd5b6101156004803603602081101561010557600080fd5b50356001600160a01b03166102d8565b005b6101156004803603602081101561012d57600080fd5b50356001600160a01b031661038c565b6101636004803603602081101561015357600080fd5b50356001600160a01b031661044f565b604080519115158252519081900360200190f35b6101636004803603602081101561018d57600080fd5b50356001600160a01b031661046d565b610115610481565b6101ad610546565b604080516001600160a01b039092168252519081900360200190f35b610163600480360360208110156101df57600080fd5b5035610555565b6101156105fb565b6101f6610690565b60408051918252519081900360200190f35b610163610696565b6101156004803603602081101561022657600080fd5b50356001600160a01b031661069f565b61016361071a565b6101156004803603602081101561025457600080fd5b503561079a565b61026361082c565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561029d578181015183820152602001610285565b50505050905090810190601f1680156102ca5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102e13361046d565b61031f576040805162461bcd60e51b815260206004820152600a60248201526927a7262cafa7aba722a960b11b604482015290519081900360640190fd5b6103288161046d565b1561036a576040805162461bcd60e51b815260206004820152600d60248201526c20a62922a0a22cafa7aba722a960991b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6103953361046d565b6103d3576040805162461bcd60e51b815260206004820152600a60248201526927a7262cafa7aba722a960b11b604482015290519081900360640190fd5b6103dc8161046d565b1561042e576040805162461bcd60e51b815260206004820181905260248201527f4f574e45525f43414e4e4f545f42455f52454d4f5645445f41535f41444d494e604482015290519081900360640190fd5b6001600160a01b03166000908152600460205260409020805460ff19169055565b6001600160a01b031660009081526004602052604090205460ff1690565b6002546001600160a01b0391821691161490565b61048a3361044f565b6104c8576040805162461bcd60e51b815260206004820152600a60248201526927a7262cafa0a226a4a760b11b604482015290519081900360640190fd5b6104d0610696565b1561050e576040805162461bcd60e51b815260206004820152600960248201526811925390531256915160ba1b604482015290519081900360640190fd5b6005805460ff191660011790556040517f6823b073d48d6e3a7d385eeb601452d680e74bb46afe3255a7d778f3a9b1768190600090a1565b6000546001600160a01b031681565b600080546001546040805160208082019390935280820186905281518082038301815260608201808452815191850191909120636a93856760e01b909152606482015290516001600160a01b0390931692636a93856792608480840193919291829003018186803b1580156105c957600080fd5b505afa1580156105dd573d6000803e3d6000fd5b505050506040513d60208110156105f357600080fd5b505192915050565b6003546001600160a01b0316331461064c576040805162461bcd60e51b815260206004820152600f60248201526e4e4f545f415f43414e44494441544560881b604482015290519081900360640190fd5b60038054600280546001600160a01b039092166001600160a01b031992831681179091556000908152600460205260409020805460ff191660011790558154169055565b60015481565b60055460ff1690565b6106a83361046d565b6106e6576040805162461bcd60e51b815260206004820152600a60248201526927a7262cafa7aba722a960b11b604482015290519081900360640190fd5b6106ef8161044f565b610717576001600160a01b0381166000908152600460205260409020805460ff191660011790555b50565b60008060009054906101000a90046001600160a01b03166001600160a01b031663d6354e156040518163ffffffff1660e01b815260040160206040518083038186803b15801561076957600080fd5b505afa15801561077d573d6000803e3d6000fd5b505050506040513d602081101561079357600080fd5b5051905090565b6107a2610696565b156107e0576040805162461bcd60e51b815260206004820152600960248201526811925390531256915160ba1b604482015290519081900360640190fd5b6107e93361044f565b610827576040805162461bcd60e51b815260206004820152600a60248201526927a7262cafa0a226a4a760b11b604482015290519081900360640190fd5b600155565b60606040518060600160405280602a815260200161084d602a913990509056fe537461726b576172655f46696e616c697a61626c6547707346616374416461707465725f323032325f31a264697066735822122019135242635f15232d0f14abc20641040dae3185d6cfa9c0815bb9d65fd91fed64736f6c634300060c0033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.