MATIC Price: $0.70 (+0.26%)
Gas: 123 GWei
 

Overview

MATIC Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 MATIC

MATIC Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
Add User To List555893412024-04-08 13:16:387 days ago1712582198IN
0xfBDb867e...3fBacFe25
0 MATIC0.00950943188.86282144
Add User Address555893412024-04-08 13:16:387 days ago1712582198IN
0xfBDb867e...3fBacFe25
0 MATIC0.00931131188.86282144
Add User To List555479562024-04-07 11:56:348 days ago1712490994IN
0xfBDb867e...3fBacFe25
0 MATIC0.00664335131.94086152
Add User Address555479542024-04-07 11:56:308 days ago1712490990IN
0xfBDb867e...3fBacFe25
0 MATIC0.00650494131.94086152
Add User Address555479542024-04-07 11:56:308 days ago1712490990IN
0xfBDb867e...3fBacFe25
0 MATIC0.00650494131.94086152
Add User To List555199722024-04-06 18:34:319 days ago1712428471IN
0xfBDb867e...3fBacFe25
0 MATIC0.0045181289.7326545
Add User Address555199722024-04-06 18:34:319 days ago1712428471IN
0xfBDb867e...3fBacFe25
0 MATIC0.0044239989.7326545
Add User To List553618842024-04-02 13:34:5713 days ago1712064897IN
0xfBDb867e...3fBacFe25
0 MATIC0.01404683278.97830468
Add User Address553618842024-04-02 13:34:5713 days ago1712064897IN
0xfBDb867e...3fBacFe25
0 MATIC0.01375418278.97830468
Add User To List527294182024-01-25 9:57:3581 days ago1706176655IN
0xfBDb867e...3fBacFe25
0 MATIC0.0025128949.90746114
Add User Address527294162024-01-25 9:57:3181 days ago1706176651IN
0xfBDb867e...3fBacFe25
0 MATIC0.0024605349.90746114
Add User To List521677952024-01-10 17:38:1496 days ago1704908294IN
0xfBDb867e...3fBacFe25
0 MATIC0.0027324654.26838993
Add User Address521677952024-01-10 17:38:1496 days ago1704908294IN
0xfBDb867e...3fBacFe25
0 MATIC0.0026755454.26838993
Add User To List521221292024-01-09 12:43:2297 days ago1704804202IN
0xfBDb867e...3fBacFe25
0 MATIC0.0031010661.58899779
Add User Address521221282024-01-09 12:43:2097 days ago1704804200IN
0xfBDb867e...3fBacFe25
0 MATIC0.0030337961.53494249
Add User Address521221282024-01-09 12:43:2097 days ago1704804200IN
0xfBDb867e...3fBacFe25
0 MATIC0.0030330561.53494249
Add User Address521221272024-01-09 12:43:1697 days ago1704804196IN
0xfBDb867e...3fBacFe25
0 MATIC0.003030261.46202295
Add User To List515821082023-12-26 14:52:06111 days ago1703602326IN
0xfBDb867e...3fBacFe25
0 MATIC0.0043451686.2975671
Add User Address515820332023-12-26 14:49:28111 days ago1703602168IN
0xfBDb867e...3fBacFe25
0 MATIC0.0043413388.05599416
Add User Address514616092023-12-23 12:52:35114 days ago1703335955IN
0xfBDb867e...3fBacFe25
0 MATIC0.00642873130.42681748
Add User To List514591602023-12-23 11:23:19114 days ago1703330599IN
0xfBDb867e...3fBacFe25
0 MATIC0.00505598100.41483097
Add User Address514591592023-12-23 11:23:17114 days ago1703330597IN
0xfBDb867e...3fBacFe25
0 MATIC0.00495241100.45051989
Add User Address513473222023-12-20 11:48:09117 days ago1703072889IN
0xfBDb867e...3fBacFe25
0 MATIC0.067762241,374.43196766
Add User To List510031352023-12-11 9:56:42126 days ago1702288602IN
0xfBDb867e...3fBacFe25
0 MATIC0.0038140275.74883707
Add User Address510030972023-12-11 9:55:10126 days ago1702288510IN
0xfBDb867e...3fBacFe25
0 MATIC0.0038299177.68265791
View all transactions

Parent Txn Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FractalRegistry

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 1 : FractalRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.9.0;

/// @title Fractal registry v0
/// @author Antoni Dikov and Shelby Doolittle
contract FractalRegistry {
    address root;
    mapping(address => bool) public delegates;

    mapping(address => bytes32) fractalIdForAddress;
    mapping(string => mapping(bytes32 => bool)) userLists;

    constructor(address _root) {
        root = _root;
    }

    /// @param addr is Eth address
    /// @return FractalId as bytes32
    function getFractalId(address addr) external view returns (bytes32) {
        return fractalIdForAddress[addr];
    }

    /// @notice Adds a user to the mapping of Eth address to FractalId.
    /// @param addr is Eth address.
    /// @param fractalId is FractalId in bytes32.
    function addUserAddress(address addr, bytes32 fractalId) external {
        requireMutatePermission();
        fractalIdForAddress[addr] = fractalId;
    }

    /// @notice Removes an address from the mapping of Eth address to FractalId.
    /// @param addr is Eth address.
    function removeUserAddress(address addr) external {
        requireMutatePermission();
        delete fractalIdForAddress[addr];
    }

    /// @notice Checks if a user by FractalId exists in a specific list.
    /// @param userId is FractalId in bytes32.
    /// @param listId is the list id.
    /// @return bool if the user is the specified list.
    function isUserInList(bytes32 userId, string memory listId)
        external
        view
        returns (bool)
    {
        return userLists[listId][userId];
    }

    /// @notice Add user by FractalId to a specific list.
    /// @param userId is FractalId in bytes32.
    /// @param listId is the list id.
    function addUserToList(bytes32 userId, string memory listId) external {
        requireMutatePermission();
        userLists[listId][userId] = true;
    }

    /// @notice Remove user by FractalId from a specific list.
    /// @param userId is FractalId in bytes32.
    /// @param listId is the list id.
    function removeUserFromList(bytes32 userId, string memory listId) external {
        requireMutatePermission();
        delete userLists[listId][userId];
    }

    /// @notice Only root can add delegates. Delegates have mutate permissions.
    /// @param addr is Eth address
    function addDelegate(address addr) external {
        require(msg.sender == root, "Must be root");
        delegates[addr] = true;
    }

    /// @notice Removing delegates is only posible from root or by himself.
    /// @param addr is Eth address
    function removeDelegate(address addr) external {
        require(
            msg.sender == root || msg.sender == addr,
            "Not allowed to remove address"
        );
        delete delegates[addr];
    }

    function requireMutatePermission() private view {
        require(
            msg.sender == root || delegates[msg.sender],
            "Not allowed to mutate"
        );
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_root","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"addDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bytes32","name":"fractalId","type":"bytes32"}],"name":"addUserAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"userId","type":"bytes32"},{"internalType":"string","name":"listId","type":"string"}],"name":"addUserToList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"delegates","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getFractalId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"userId","type":"bytes32"},{"internalType":"string","name":"listId","type":"string"}],"name":"isUserInList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"removeDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"removeUserAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"userId","type":"bytes32"},{"internalType":"string","name":"listId","type":"string"}],"name":"removeUserFromList","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50604051610ce0380380610ce0833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610bc9806101176000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063a535f5e911610066578063a535f5e91461011c578063ce8767b21461014c578063d18c216e14610168578063e71bdf4114610198578063ef8b5773146101b457610093565b8063587cde1e1461009857806367e7646f146100c857806370491d7e146100e4578063a2af447a14610100575b600080fd5b6100b260048036038101906100ad9190610711565b6101d0565b6040516100bf9190610759565b60405180910390f35b6100e260048036038101906100dd9190610711565b6101f0565b005b6100fe60048036038101906100f991906108f0565b610306565b005b61011a60048036038101906101159190610711565b61035a565b005b610136600480360381019061013191906108f0565b6103a8565b6040516101439190610759565b60405180910390f35b610166600480360381019061016191906108f0565b6103ef565b005b610182600480360381019061017d9190610711565b61043a565b60405161018f919061095b565b60405180910390f35b6101b260048036038101906101ad9190610711565b610483565b005b6101ce60048036038101906101c99190610976565b61056b565b005b60016020528060005260406000206000915054906101000a900460ff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061027557508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6102b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ab90610a13565b60405180910390fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff021916905550565b61030e6105bb565b60016003826040516103209190610aa4565b9081526020016040518091039020600084815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6103626105bb565b600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000905550565b60006003826040516103ba9190610aa4565b9081526020016040518091039020600084815260200190815260200160002060009054906101000a900460ff16905092915050565b6103f76105bb565b6003816040516104079190610aa4565b9081526020016040518091039020600083815260200190815260200160002060006101000a81549060ff02191690555050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610511576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050890610b07565b60405180910390fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6105736105bb565b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061065e5750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b61069d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069490610b73565b60405180910390fd5b565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006106de826106b3565b9050919050565b6106ee816106d3565b81146106f957600080fd5b50565b60008135905061070b816106e5565b92915050565b600060208284031215610727576107266106a9565b5b6000610735848285016106fc565b91505092915050565b60008115159050919050565b6107538161073e565b82525050565b600060208201905061076e600083018461074a565b92915050565b6000819050919050565b61078781610774565b811461079257600080fd5b50565b6000813590506107a48161077e565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6107fd826107b4565b810181811067ffffffffffffffff8211171561081c5761081b6107c5565b5b80604052505050565b600061082f61069f565b905061083b82826107f4565b919050565b600067ffffffffffffffff82111561085b5761085a6107c5565b5b610864826107b4565b9050602081019050919050565b82818337600083830152505050565b600061089361088e84610840565b610825565b9050828152602081018484840111156108af576108ae6107af565b5b6108ba848285610871565b509392505050565b600082601f8301126108d7576108d66107aa565b5b81356108e7848260208601610880565b91505092915050565b60008060408385031215610907576109066106a9565b5b600061091585828601610795565b925050602083013567ffffffffffffffff811115610936576109356106ae565b5b610942858286016108c2565b9150509250929050565b61095581610774565b82525050565b6000602082019050610970600083018461094c565b92915050565b6000806040838503121561098d5761098c6106a9565b5b600061099b858286016106fc565b92505060206109ac85828601610795565b9150509250929050565b600082825260208201905092915050565b7f4e6f7420616c6c6f77656420746f2072656d6f76652061646472657373000000600082015250565b60006109fd601d836109b6565b9150610a08826109c7565b602082019050919050565b60006020820190508181036000830152610a2c816109f0565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610a67578082015181840152602081019050610a4c565b60008484015250505050565b6000610a7e82610a33565b610a888185610a3e565b9350610a98818560208601610a49565b80840191505092915050565b6000610ab08284610a73565b915081905092915050565b7f4d75737420626520726f6f740000000000000000000000000000000000000000600082015250565b6000610af1600c836109b6565b9150610afc82610abb565b602082019050919050565b60006020820190508181036000830152610b2081610ae4565b9050919050565b7f4e6f7420616c6c6f77656420746f206d75746174650000000000000000000000600082015250565b6000610b5d6015836109b6565b9150610b6882610b27565b602082019050919050565b60006020820190508181036000830152610b8c81610b50565b905091905056fea264697066735822122064f75efdec7d87d44936b2e491c5669313fbc5f3149c20530d4ee347eefc5b9064736f6c6343000810003300000000000000000000000009542da3384d0ddc4ba08819ab1893b7656c1c76

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063a535f5e911610066578063a535f5e91461011c578063ce8767b21461014c578063d18c216e14610168578063e71bdf4114610198578063ef8b5773146101b457610093565b8063587cde1e1461009857806367e7646f146100c857806370491d7e146100e4578063a2af447a14610100575b600080fd5b6100b260048036038101906100ad9190610711565b6101d0565b6040516100bf9190610759565b60405180910390f35b6100e260048036038101906100dd9190610711565b6101f0565b005b6100fe60048036038101906100f991906108f0565b610306565b005b61011a60048036038101906101159190610711565b61035a565b005b610136600480360381019061013191906108f0565b6103a8565b6040516101439190610759565b60405180910390f35b610166600480360381019061016191906108f0565b6103ef565b005b610182600480360381019061017d9190610711565b61043a565b60405161018f919061095b565b60405180910390f35b6101b260048036038101906101ad9190610711565b610483565b005b6101ce60048036038101906101c99190610976565b61056b565b005b60016020528060005260406000206000915054906101000a900460ff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061027557508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6102b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ab90610a13565b60405180910390fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff021916905550565b61030e6105bb565b60016003826040516103209190610aa4565b9081526020016040518091039020600084815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6103626105bb565b600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000905550565b60006003826040516103ba9190610aa4565b9081526020016040518091039020600084815260200190815260200160002060009054906101000a900460ff16905092915050565b6103f76105bb565b6003816040516104079190610aa4565b9081526020016040518091039020600083815260200190815260200160002060006101000a81549060ff02191690555050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610511576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050890610b07565b60405180910390fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6105736105bb565b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061065e5750600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b61069d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069490610b73565b60405180910390fd5b565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006106de826106b3565b9050919050565b6106ee816106d3565b81146106f957600080fd5b50565b60008135905061070b816106e5565b92915050565b600060208284031215610727576107266106a9565b5b6000610735848285016106fc565b91505092915050565b60008115159050919050565b6107538161073e565b82525050565b600060208201905061076e600083018461074a565b92915050565b6000819050919050565b61078781610774565b811461079257600080fd5b50565b6000813590506107a48161077e565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6107fd826107b4565b810181811067ffffffffffffffff8211171561081c5761081b6107c5565b5b80604052505050565b600061082f61069f565b905061083b82826107f4565b919050565b600067ffffffffffffffff82111561085b5761085a6107c5565b5b610864826107b4565b9050602081019050919050565b82818337600083830152505050565b600061089361088e84610840565b610825565b9050828152602081018484840111156108af576108ae6107af565b5b6108ba848285610871565b509392505050565b600082601f8301126108d7576108d66107aa565b5b81356108e7848260208601610880565b91505092915050565b60008060408385031215610907576109066106a9565b5b600061091585828601610795565b925050602083013567ffffffffffffffff811115610936576109356106ae565b5b610942858286016108c2565b9150509250929050565b61095581610774565b82525050565b6000602082019050610970600083018461094c565b92915050565b6000806040838503121561098d5761098c6106a9565b5b600061099b858286016106fc565b92505060206109ac85828601610795565b9150509250929050565b600082825260208201905092915050565b7f4e6f7420616c6c6f77656420746f2072656d6f76652061646472657373000000600082015250565b60006109fd601d836109b6565b9150610a08826109c7565b602082019050919050565b60006020820190508181036000830152610a2c816109f0565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610a67578082015181840152602081019050610a4c565b60008484015250505050565b6000610a7e82610a33565b610a888185610a3e565b9350610a98818560208601610a49565b80840191505092915050565b6000610ab08284610a73565b915081905092915050565b7f4d75737420626520726f6f740000000000000000000000000000000000000000600082015250565b6000610af1600c836109b6565b9150610afc82610abb565b602082019050919050565b60006020820190508181036000830152610b2081610ae4565b9050919050565b7f4e6f7420616c6c6f77656420746f206d75746174650000000000000000000000600082015250565b6000610b5d6015836109b6565b9150610b6882610b27565b602082019050919050565b60006020820190508181036000830152610b8c81610b50565b905091905056fea264697066735822122064f75efdec7d87d44936b2e491c5669313fbc5f3149c20530d4ee347eefc5b9064736f6c63430008100033

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

00000000000000000000000009542da3384d0ddc4ba08819ab1893b7656c1c76

-----Decoded View---------------
Arg [0] : _root (address): 0x09542da3384D0ddc4bA08819aB1893B7656c1c76

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000009542da3384d0ddc4ba08819ab1893b7656c1c76


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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