xDAI Price: $1.00 (-0.00%)
Gas: 1 GWei

Contract

0x9d494768936b6bDaabc46733b8D53A937A6c6D7e

Overview

xDAI Balance

Gnosis Chain LogoGnosis Chain LogoGnosis Chain Logo0 xDAI

xDAI Value

$0.00

Multichain Info

No addresses found
Amount:Between 1-1M
Reset Filter

Transaction Hash
Method
Block
From
To

There are no matching entries

Update your filters to view other transactions

View more zero value Internal Transactions in Advanced View mode

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PolicyRegistry

Compiler Version
v0.4.26+commit.4563c3fc

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at gnosisscan.io on 2022-08-04
*/

// File: contracts/kleros/PolicyRegistry.sol

pragma solidity ^0.4.24;

/**
 *  @title PolicyRegistry
 *  @author Enrique Piqueras - <[email protected]>
 *  @dev A contract to maintain a policy for each subcourt.
 */
contract PolicyRegistry {
    /* Events */

    /** @dev Emitted when a policy is updated.
     *  @param _subcourtID The ID of the policy's subcourt.
     *  @param _policy The URI of the policy JSON.
     */
    event PolicyUpdate(uint indexed _subcourtID, string _policy);

    /* Storage */

    address public governor;
    mapping(uint => string) public policies;

    /* Modifiers */

    /** @dev Requires that the sender is the governor. */
    modifier onlyByGovernor() {require(governor == msg.sender, "Can only be called by the governor."); _;}

    /* Constructor */

    /** @dev Constructs the `PolicyRegistry` contract.
     *  @param _governor The governor's address.
     */
    constructor(address _governor) public {governor = _governor;}

    /* External */

    /** @dev Changes the `governor` storage variable.
     *  @param _governor The new value for the `governor` storage variable.
     */
    function changeGovernor(address _governor) external onlyByGovernor {governor = _governor;}

    /** @dev Sets the policy for the specified subcourt.
     *  @param _subcourtID The ID of the specified subcourt.
     *  @param _policy The URI of the policy JSON.
     */
    function setPolicy(uint _subcourtID, string _policy) external onlyByGovernor {
        policies[_subcourtID] = _policy;
        emit PolicyUpdate(_subcourtID, policies[_subcourtID]);
    }
}

Contract Security Audit

Contract ABI

API
[{"constant":true,"inputs":[],"name":"governor","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"policies","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_governor","type":"address"}],"name":"changeGovernor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_subcourtID","type":"uint256"},{"name":"_policy","type":"string"}],"name":"setPolicy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_governor","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_subcourtID","type":"uint256"},{"indexed":false,"name":"_policy","type":"string"}],"name":"PolicyUpdate","type":"event"}]

608060405234801561001057600080fd5b506040516020806105c1833981016040525160008054600160a060020a03909216600160a060020a031990921691909117905561056f806100526000396000f3006080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630c340a248114610066578063d3e89483146100a4578063e4c0aaf414610131578063f00adf5e14610161575b600080fd5b34801561007257600080fd5b5061007b610185565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100b057600080fd5b506100bc6004356101a1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f65781810151838201526020016100de565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561013d57600080fd5b5061015f73ffffffffffffffffffffffffffffffffffffffff6004351661023b565b005b34801561016d57600080fd5b5061015f600480359060248035908101910135610323565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60016020818152600092835260409283902080548451600294821615610100026000190190911693909304601f81018390048302840183019094528383529192908301828280156102335780601f1061020857610100808354040283529160200191610233565b820191906000526020600020905b81548152906001019060200180831161021657829003601f168201915b505050505081565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102e757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f43616e206f6e6c792062652063616c6c65642062792074686520676f7665726e60448201527f6f722e0000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103cf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f43616e206f6e6c792062652063616c6c65642062792074686520676f7665726e60448201527f6f722e0000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008381526001602052604090206103e89083836104a8565b50600083815260016020818152604092839020835182815281546002948116156101000260001901169390930491830182905286937f6363e8b93c0bbb112f6247819a99f3c99f4a3e0f8e119a64e5ceb6edb9b3cc7b9391928291820190849080156104955780601f1061046a57610100808354040283529160200191610495565b820191906000526020600020905b81548152906001019060200180831161047857829003601f168201915b50509250505060405180910390a2505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106104e95782800160ff19823516178555610516565b82800160010185558215610516579182015b828111156105165782358255916020019190600101906104fb565b50610522929150610526565b5090565b61054091905b80821115610522576000815560010161052c565b905600a165627a7a723058202c10f534715194c1ee0b8d84a4f8e1114d212165cddd38779aaa4a4adfae253f002900000000000000000000000042fc1fe86e15eb56a2815e6230aa88efc87f5c15

Deployed Bytecode

0x6080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630c340a248114610066578063d3e89483146100a4578063e4c0aaf414610131578063f00adf5e14610161575b600080fd5b34801561007257600080fd5b5061007b610185565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100b057600080fd5b506100bc6004356101a1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f65781810151838201526020016100de565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561013d57600080fd5b5061015f73ffffffffffffffffffffffffffffffffffffffff6004351661023b565b005b34801561016d57600080fd5b5061015f600480359060248035908101910135610323565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60016020818152600092835260409283902080548451600294821615610100026000190190911693909304601f81018390048302840183019094528383529192908301828280156102335780601f1061020857610100808354040283529160200191610233565b820191906000526020600020905b81548152906001019060200180831161021657829003601f168201915b505050505081565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102e757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f43616e206f6e6c792062652063616c6c65642062792074686520676f7665726e60448201527f6f722e0000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103cf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f43616e206f6e6c792062652063616c6c65642062792074686520676f7665726e60448201527f6f722e0000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008381526001602052604090206103e89083836104a8565b50600083815260016020818152604092839020835182815281546002948116156101000260001901169390930491830182905286937f6363e8b93c0bbb112f6247819a99f3c99f4a3e0f8e119a64e5ceb6edb9b3cc7b9391928291820190849080156104955780601f1061046a57610100808354040283529160200191610495565b820191906000526020600020905b81548152906001019060200180831161047857829003601f168201915b50509250505060405180910390a2505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106104e95782800160ff19823516178555610516565b82800160010185558215610516579182015b828111156105165782358255916020019190600101906104fb565b50610522929150610526565b5090565b61054091905b80821115610522576000815560010161052c565b905600a165627a7a723058202c10f534715194c1ee0b8d84a4f8e1114d212165cddd38779aaa4a4adfae253f0029

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

00000000000000000000000042fc1fe86e15eb56a2815e6230aa88efc87f5c15

-----Decoded View---------------
Arg [0] : _governor (address): 0x42Fc1fe86E15eB56a2815e6230AA88EFC87f5c15

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000042fc1fe86e15eb56a2815e6230aa88efc87f5c15


Block Transaction Gas Used Reward
view all blocks validated

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits

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.