From ab21d69be2b9dbfd25ecc549f180e3baed255935 Mon Sep 17 00:00:00 2001 From: Louis Holbrook Date: Tue, 7 Feb 2023 10:20:26 +0000 Subject: [PATCH] - Retire isRemoved function because why? --- python/eth_accounts_index/data/AccountsIndex.bin | 2 +- python/eth_accounts_index/data/AccountsIndex.json | 2 +- python/setup.cfg | 2 +- solidity/AccountsIndex.sol | 9 +-------- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/python/eth_accounts_index/data/AccountsIndex.bin b/python/eth_accounts_index/data/AccountsIndex.bin index 2ffe80c..98d000b 100644 --- a/python/eth_accounts_index/data/AccountsIndex.bin +++ b/python/eth_accounts_index/data/AccountsIndex.bin @@ -1 +1 @@ -608060405234801561001057600080fd5b5033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610d9e806100616000396000f3fe608060405234801561001057600080fd5b50600436106100c6576000357c0100000000000000000000000000000000000000000000000000000000900480635ae06f7e1161008e5780635ae06f7e146101a957806379ba5097146101d95780637d3374e5146101f75780638da5cb5b14610227578063da2824a814610245578063f2fde38b14610275576100c6565b806301ffc9a7146100cb5780630a3b0a4f146100fb5780630cbb0f831461012b57806329092d0e146101495780633ef2501314610179575b600080fd5b6100e560048036038101906100e09190610b85565b6102a5565b6040516100f29190610bcd565b60405180910390f35b61011560048036038101906101109190610c46565b61044b565b6040516101229190610bcd565b60405180910390f35b610133610595565b6040516101409190610c8c565b60405180910390f35b610163600480360381019061015e9190610c46565b61059b565b6040516101709190610bcd565b60405180910390f35b610193600480360381019061018e9190610c46565b6106a2565b6040516101a09190610bcd565b60405180910390f35b6101c360048036038101906101be9190610c46565b6106ed565b6040516101d09190610bcd565b60405180910390f35b6101e16107a1565b6040516101ee9190610bcd565b60405180910390f35b610211600480360381019061020c9190610c46565b610948565b60405161021e9190610bcd565b60405180910390f35b61022f6109a3565b60405161023c9190610cb6565b60405180910390f35b61025f600480360381019061025a9190610c46565b6109c9565b60405161026c9190610bcd565b60405180910390f35b61028f600480360381019061028a9190610c46565b610a86565b60405161029c9190610bcd565b60405180910390f35b600063cbdb05c77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036102f95760019050610446565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361034b5760019050610446565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361039d5760019050610446565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036103ef5760019050610446565b6380c84bd67c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036104415760019050610446565b600090505b919050565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166104a357600080fd5b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146104ef57600080fd5b42600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060016000546105429190610d00565b600081905550428273ffffffffffffffffffffffffffffffffffffffff167f9cc987676e7d63379f176ea50df0ae8d2d9d1141d1231d4ce15b5965f73c943060405160405180910390a360019050919050565b60005481565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166105f357600080fd5b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541161063f57600080fd5b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060016000546106939190610d34565b60008190555060019050919050565b600080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054119050919050565b60003373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461074957600080fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff021916905560019050919050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107fe57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b600080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205403610999576001905061099e565b600090505b919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a2557600080fd5b6001600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ae257600080fd5b81600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610b6281610b2d565b8114610b6d57600080fd5b50565b600081359050610b7f81610b59565b92915050565b600060208284031215610b9b57610b9a610b28565b5b6000610ba984828501610b70565b91505092915050565b60008115159050919050565b610bc781610bb2565b82525050565b6000602082019050610be26000830184610bbe565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c1382610be8565b9050919050565b610c2381610c08565b8114610c2e57600080fd5b50565b600081359050610c4081610c1a565b92915050565b600060208284031215610c5c57610c5b610b28565b5b6000610c6a84828501610c31565b91505092915050565b6000819050919050565b610c8681610c73565b82525050565b6000602082019050610ca16000830184610c7d565b92915050565b610cb081610c08565b82525050565b6000602082019050610ccb6000830184610ca7565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610d0b82610c73565b9150610d1683610c73565b9250828201905080821115610d2e57610d2d610cd1565b5b92915050565b6000610d3f82610c73565b9150610d4a83610c73565b9250828203905081811115610d6257610d61610cd1565b5b9291505056fea2646970667358221220bb3974285de177fcb410d25715db8c72660744f280fe34b0c9f5b37c6459d33e64736f6c63430008120033 \ No newline at end of file +608060405234801561001057600080fd5b5033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610d5b806100616000396000f3fe608060405234801561001057600080fd5b50600436106100c6576000357c0100000000000000000000000000000000000000000000000000000000900480635ae06f7e1161008e5780635ae06f7e146101a957806379ba5097146101d95780638da5cb5b146101f7578063da2824a814610215578063e0db665b14610245578063f2fde38b14610275576100c6565b806301ffc9a7146100cb5780630a3b0a4f146100fb5780630cbb0f831461012b57806329092d0e146101495780633ef2501314610179575b600080fd5b6100e560048036038101906100e09190610b42565b6102a5565b6040516100f29190610b8a565b60405180910390f35b61011560048036038101906101109190610c03565b61044b565b6040516101229190610b8a565b60405180910390f35b610133610595565b6040516101409190610c49565b60405180910390f35b610163600480360381019061015e9190610c03565b61059b565b6040516101709190610b8a565b60405180910390f35b610193600480360381019061018e9190610c03565b6106a2565b6040516101a09190610b8a565b60405180910390f35b6101c360048036038101906101be9190610c03565b6106ed565b6040516101d09190610b8a565b60405180910390f35b6101e16107a1565b6040516101ee9190610b8a565b60405180910390f35b6101ff610948565b60405161020c9190610c73565b60405180910390f35b61022f600480360381019061022a9190610c03565b61096e565b60405161023c9190610b8a565b60405180910390f35b61025f600480360381019061025a9190610c03565b610a2b565b60405161026c9190610c49565b60405180910390f35b61028f600480360381019061028a9190610c03565b610a43565b60405161029c9190610b8a565b60405180910390f35b600063cbdb05c77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036102f95760019050610446565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361034b5760019050610446565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361039d5760019050610446565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036103ef5760019050610446565b6380c84bd67c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036104415760019050610446565b600090505b919050565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166104a357600080fd5b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146104ef57600080fd5b42600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060016000546105429190610cbd565b600081905550428273ffffffffffffffffffffffffffffffffffffffff167f9cc987676e7d63379f176ea50df0ae8d2d9d1141d1231d4ce15b5965f73c943060405160405180910390a360019050919050565b60005481565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166105f357600080fd5b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541161063f57600080fd5b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060016000546106939190610cf1565b60008190555060019050919050565b600080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054119050919050565b60003373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461074957600080fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff021916905560019050919050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107fe57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109ca57600080fd5b6001600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b60016020528060005260406000206000915090505481565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a9f57600080fd5b81600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610b1f81610aea565b8114610b2a57600080fd5b50565b600081359050610b3c81610b16565b92915050565b600060208284031215610b5857610b57610ae5565b5b6000610b6684828501610b2d565b91505092915050565b60008115159050919050565b610b8481610b6f565b82525050565b6000602082019050610b9f6000830184610b7b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610bd082610ba5565b9050919050565b610be081610bc5565b8114610beb57600080fd5b50565b600081359050610bfd81610bd7565b92915050565b600060208284031215610c1957610c18610ae5565b5b6000610c2784828501610bee565b91505092915050565b6000819050919050565b610c4381610c30565b82525050565b6000602082019050610c5e6000830184610c3a565b92915050565b610c6d81610bc5565b82525050565b6000602082019050610c886000830184610c64565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610cc882610c30565b9150610cd383610c30565b9250828201905080821115610ceb57610cea610c8e565b5b92915050565b6000610cfc82610c30565b9150610d0783610c30565b9250828203905081811115610d1f57610d1e610c8e565b5b9291505056fea264697066735822122060f30e498959b8c3252850982d3f5cabfd6da86504a40fee4fac988889cae30164736f6c63430008120033 \ No newline at end of file diff --git a/python/eth_accounts_index/data/AccountsIndex.json b/python/eth_accounts_index/data/AccountsIndex.json index 825023d..6cfdb3a 100644 --- a/python/eth_accounts_index/data/AccountsIndex.json +++ b/python/eth_accounts_index/data/AccountsIndex.json @@ -1 +1 @@ -[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addedAccount","type":"address"},{"indexed":true,"internalType":"uint256","name":"accountIndex","type":"uint256"}],"name":"AddressAdded","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":[],"name":"acceptOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"add","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_writer","type":"address"}],"name":"addWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_writer","type":"address"}],"name":"deleteWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"entryCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"have","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"isRemoved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"remove","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"}] +[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addedAccount","type":"address"},{"indexed":true,"internalType":"uint256","name":"accountIndex","type":"uint256"}],"name":"AddressAdded","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":[],"name":"acceptOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"add","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_writer","type":"address"}],"name":"addWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_writer","type":"address"}],"name":"deleteWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"entryCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"entryIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"have","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"remove","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"}] diff --git a/python/setup.cfg b/python/setup.cfg index d3f4c26..754f089 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = eth-accounts-index -version = 0.3.1 +version = 0.3.2 description = Accounts index evm contract tooling with permissioned writes author = Louis Holbrook author_email = dev@holbrook.no diff --git a/solidity/AccountsIndex.sol b/solidity/AccountsIndex.sol index c8ebe7b..77a1da7 100644 --- a/solidity/AccountsIndex.sol +++ b/solidity/AccountsIndex.sol @@ -6,7 +6,7 @@ pragma solidity >0.6.11; contract CustodialAccountIndex { uint256 public entryCount; - mapping(address => uint256) entryIndex; + mapping(address => uint256) public entryIndex; mapping(address => bool) writers; address public owner; address newOwner; @@ -90,11 +90,4 @@ contract CustodialAccountIndex { } return false; } - - function isRemoved(address _account) external view returns (bool){ - if (entryIndex[_account] == 0) { - return true; - } - return false; - } }