contract-registry

Ethereum Smart Contract key-value registry
Log | Files | Refs

commit c1d95613e909329eabf08e080ee1df41cb79459a
parent 695c8afd783cc6aa6e26fcf2646f5d1ced1f56e8
Author: lash <dev@holbrook.no>
Date:   Sat, 25 Mar 2023 14:45:46 +0000

Revert registry interface id

Diffstat:
Mpython/eth_contract_registry/data/Registry.bin | 4++--
Mpython/eth_contract_registry/data/Registry.metadata.json | 2+-
Msolidity/Registry.sol | 4++--
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/python/eth_contract_registry/data/Registry.bin b/python/eth_contract_registry/data/Registry.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b5060405162000de238038062000de28339818101604052810190620000379190620002ad565b33600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060005b8151811015620000e15760028282815181106200009d576200009c620002fe565b5b602002602001015190806001815401808255809150506001900390600052602060002001600090919091909150558080620000d89062000366565b9150506200007b565b5050620003b3565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200014d8262000102565b810181811067ffffffffffffffff821117156200016f576200016e62000113565b5b80604052505050565b600062000184620000e9565b905062000192828262000142565b919050565b600067ffffffffffffffff821115620001b557620001b462000113565b5b602082029050602081019050919050565b600080fd5b6000819050919050565b620001e081620001cb565b8114620001ec57600080fd5b50565b6000815190506200020081620001d5565b92915050565b60006200021d620002178462000197565b62000178565b90508083825260208201905060208402830185811115620002435762000242620001c6565b5b835b818110156200027057806200025b8882620001ef565b84526020840193505060208101905062000245565b5050509392505050565b600082601f830112620002925762000291620000fd565b5b8151620002a484826020860162000206565b91505092915050565b600060208284031215620002c657620002c5620000f3565b5b600082015167ffffffffffffffff811115620002e757620002e6620000f8565b5b620002f5848285016200027a565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000819050919050565b600062000373826200035c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203620003a857620003a76200032d565b5b600182019050919050565b610a1f80620003c36000396000f3fe608060405234801561001057600080fd5b506004361061009a576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100785780638da5cb5b1461011d578063ba44593c1461013b578063bb34534c1461016b578063f2fde38b1461019b5761009a565b806301ffc9a71461009f57806328f2d4da146100cf5780633480c704146100ff575b600080fd5b6100b960048036038101906100b491906106d1565b6101cb565b6040516100c69190610719565b60405180910390f35b6100e960048036038101906100e4919061076a565b6102cd565b6040516100f691906107b0565b60405180910390f35b6101076102f1565b60405161011491906107da565b60405180910390f35b6101256102fe565b6040516101329190610836565b60405180910390f35b610155600480360381019061015091906108a9565b610324565b6040516101629190610719565b60405180910390f35b610185600480360381019061018091906108e9565b610511565b6040516101929190610836565b60405180910390f35b6101b560048036038101906101b09190610916565b61054d565b6040516101c29190610719565b60405180910390f35b600063a82606d97c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361021f57600190506102c8565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361027157600190506102c8565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036102c357600190506102c8565b600090505b919050565b600281815481106102dd57600080fd5b906000526020600020016000915090505481565b6000600280549050905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461038057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146103eb57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361042457600080fd5b6000805b60028054905081101561047257846002828154811061044a57610449610943565b5b90600052602060002001540361045f57600191505b808061046a906109a1565b915050610428565b508061047d57600080fd5b8260008086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550837f3465c39c7e9b14641553cf015fbfe670207bd64c689d17806d885bda47899feb846040516104fe9190610836565b60405180910390a2600191505092915050565b600080600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105aa57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36001915050919050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6106ae81610679565b81146106b957600080fd5b50565b6000813590506106cb816106a5565b92915050565b6000602082840312156106e7576106e6610674565b5b60006106f5848285016106bc565b91505092915050565b60008115159050919050565b610713816106fe565b82525050565b600060208201905061072e600083018461070a565b92915050565b6000819050919050565b61074781610734565b811461075257600080fd5b50565b6000813590506107648161073e565b92915050565b6000602082840312156107805761077f610674565b5b600061078e84828501610755565b91505092915050565b6000819050919050565b6107aa81610797565b82525050565b60006020820190506107c560008301846107a1565b92915050565b6107d481610734565b82525050565b60006020820190506107ef60008301846107cb565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610820826107f5565b9050919050565b61083081610815565b82525050565b600060208201905061084b6000830184610827565b92915050565b61085a81610797565b811461086557600080fd5b50565b60008135905061087781610851565b92915050565b61088681610815565b811461089157600080fd5b50565b6000813590506108a38161087d565b92915050565b600080604083850312156108c0576108bf610674565b5b60006108ce85828601610868565b92505060206108df85828601610894565b9150509250929050565b6000602082840312156108ff576108fe610674565b5b600061090d84828501610868565b91505092915050565b60006020828403121561092c5761092b610674565b5b600061093a84828501610894565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006109ac82610734565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036109de576109dd610972565b5b60018201905091905056fea264697066735822122096da4a3ec1a044cb9f9cc214532f9376cf1883074ff03b36cc2f7435a5ab4b0964736f6c63430008120033 -\ No newline at end of file +60806040523480156200001157600080fd5b5060405162000de238038062000de28339818101604052810190620000379190620002ad565b33600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060005b8151811015620000e15760028282815181106200009d576200009c620002fe565b5b602002602001015190806001815401808255809150506001900390600052602060002001600090919091909150558080620000d89062000366565b9150506200007b565b5050620003b3565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200014d8262000102565b810181811067ffffffffffffffff821117156200016f576200016e62000113565b5b80604052505050565b600062000184620000e9565b905062000192828262000142565b919050565b600067ffffffffffffffff821115620001b557620001b462000113565b5b602082029050602081019050919050565b600080fd5b6000819050919050565b620001e081620001cb565b8114620001ec57600080fd5b50565b6000815190506200020081620001d5565b92915050565b60006200021d620002178462000197565b62000178565b90508083825260208201905060208402830185811115620002435762000242620001c6565b5b835b818110156200027057806200025b8882620001ef565b84526020840193505060208101905062000245565b5050509392505050565b600082601f830112620002925762000291620000fd565b5b8151620002a484826020860162000206565b91505092915050565b600060208284031215620002c657620002c5620000f3565b5b600082015167ffffffffffffffff811115620002e757620002e6620000f8565b5b620002f5848285016200027a565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000819050919050565b600062000373826200035c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203620003a857620003a76200032d565b5b600182019050919050565b610a1f80620003c36000396000f3fe608060405234801561001057600080fd5b506004361061009a576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100785780638da5cb5b1461011d578063ba44593c1461013b578063bb34534c1461016b578063f2fde38b1461019b5761009a565b806301ffc9a71461009f57806328f2d4da146100cf5780633480c704146100ff575b600080fd5b6100b960048036038101906100b491906106d1565b6101cb565b6040516100c69190610719565b60405180910390f35b6100e960048036038101906100e4919061076a565b6102cd565b6040516100f691906107b0565b60405180910390f35b6101076102f1565b60405161011491906107da565b60405180910390f35b6101256102fe565b6040516101329190610836565b60405180910390f35b610155600480360381019061015091906108a9565b610324565b6040516101629190610719565b60405180910390f35b610185600480360381019061018091906108e9565b610511565b6040516101929190610836565b60405180910390f35b6101b560048036038101906101b09190610916565b61054d565b6040516101c29190610719565b60405180910390f35b60006312625fe57c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361021f57600190506102c8565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361027157600190506102c8565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036102c357600190506102c8565b600090505b919050565b600281815481106102dd57600080fd5b906000526020600020016000915090505481565b6000600280549050905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461038057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146103eb57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361042457600080fd5b6000805b60028054905081101561047257846002828154811061044a57610449610943565b5b90600052602060002001540361045f57600191505b808061046a906109a1565b915050610428565b508061047d57600080fd5b8260008086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550837f3465c39c7e9b14641553cf015fbfe670207bd64c689d17806d885bda47899feb846040516104fe9190610836565b60405180910390a2600191505092915050565b600080600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105aa57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36001915050919050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6106ae81610679565b81146106b957600080fd5b50565b6000813590506106cb816106a5565b92915050565b6000602082840312156106e7576106e6610674565b5b60006106f5848285016106bc565b91505092915050565b60008115159050919050565b610713816106fe565b82525050565b600060208201905061072e600083018461070a565b92915050565b6000819050919050565b61074781610734565b811461075257600080fd5b50565b6000813590506107648161073e565b92915050565b6000602082840312156107805761077f610674565b5b600061078e84828501610755565b91505092915050565b6000819050919050565b6107aa81610797565b82525050565b60006020820190506107c560008301846107a1565b92915050565b6107d481610734565b82525050565b60006020820190506107ef60008301846107cb565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610820826107f5565b9050919050565b61083081610815565b82525050565b600060208201905061084b6000830184610827565b92915050565b61085a81610797565b811461086557600080fd5b50565b60008135905061087781610851565b92915050565b61088681610815565b811461089157600080fd5b50565b6000813590506108a38161087d565b92915050565b600080604083850312156108c0576108bf610674565b5b60006108ce85828601610868565b92505060206108df85828601610894565b9150509250929050565b6000602082840312156108ff576108fe610674565b5b600061090d84828501610868565b91505092915050565b60006020828403121561092c5761092b610674565b5b600061093a84828501610894565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006109ac82610734565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036109de576109dd610972565b5b60018201905091905056fea2646970667358221220d72f3817d60cb0275d6d71dcacacd6bd79ba385579039d1c9ce0818c631fb69764736f6c63430008120033 +\ No newline at end of file diff --git a/python/eth_contract_registry/data/Registry.metadata.json b/python/eth_contract_registry/data/Registry.metadata.json @@ -1 +1 @@ -{"compiler":{"version":"0.8.18+commit.87f61d96"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"bytes32[]","name":"_identifiers","type":"bytes32[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_key","type":"bytes32"},{"indexed":false,"internalType":"address","name":"_address","type":"address"}],"name":"AddressKey","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"_newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"bytes32","name":"_identifier","type":"bytes32"}],"name":"addressOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"identifierCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"identifiers","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_identifier","type":"bytes32"},{"internalType":"address","name":"_address","type":"address"}],"name":"set","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"Registry.sol":"ContractRegistry"},"evmVersion":"byzantium","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"Registry.sol":{"keccak256":"0xe23a9e5585273a37200157c8687519a3729264f8c28507d1307eaf39504dc259","license":"AGPL-3.0-or-later","urls":["bzz-raw://2f315e65e79b80a67355ea35017d73cc6024e38c210dd060a1b38166c1bce944","dweb:/ipfs/QmcrEjQTJ6uiDpSVeNdYqUWNXipLgX1h6PnBReAnhqFGAp"]}},"version":1} +{"compiler":{"version":"0.8.18+commit.87f61d96"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"bytes32[]","name":"_identifiers","type":"bytes32[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_key","type":"bytes32"},{"indexed":false,"internalType":"address","name":"_address","type":"address"}],"name":"AddressKey","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"_newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"bytes32","name":"_identifier","type":"bytes32"}],"name":"addressOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"identifierCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"identifiers","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_identifier","type":"bytes32"},{"internalType":"address","name":"_address","type":"address"}],"name":"set","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"Registry.sol":"ContractRegistry"},"evmVersion":"byzantium","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"Registry.sol":{"keccak256":"0xaf103e9a3b2799c32eaa66fb411922235e92dd9cc23ea9f36b3dd75788f71bbe","license":"AGPL-3.0-or-later","urls":["bzz-raw://345551dbbf0a05fe4cee85c3d2bdf44013b36b64470c63d5af37e993b6fd6aaf","dweb:/ipfs/QmQqpBf8UfBBBhtRtX5vYiBViuXDWAFvyjCzXQkw53QWFS"]}},"version":1} diff --git a/solidity/Registry.sol b/solidity/Registry.sol @@ -28,7 +28,7 @@ contract ContractRegistry { } } - // Implements Registry + // Assign address to identifier function set(bytes32 _identifier, address _address) public returns (bool) { require(msg.sender == owner); require(entries[_identifier] == address(0)); @@ -72,7 +72,7 @@ contract ContractRegistry { // Implements ERC165 function supportsInterface(bytes4 _sum) public pure returns (bool) { - if (_sum == 0xa82606d9) { // Registry + if (_sum == 0x12625fe5) { // Registry return true; } if (_sum == 0x01ffc9a7) { // ERC165