From 5bd07a9bed2913df4a911acb5d57f8e7dff66e5c Mon Sep 17 00:00:00 2001 From: Matheus Alencar Date: Thu, 24 Jan 2019 13:54:00 -0200 Subject: [PATCH] feat(t2cr): add method to query item status by address --- .../standard/permission/ArbitrableAddressList.sol | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/contracts/standard/permission/ArbitrableAddressList.sol b/contracts/standard/permission/ArbitrableAddressList.sol index dcb41da6..12c05e3a 100644 --- a/contracts/standard/permission/ArbitrableAddressList.sol +++ b/contracts/standard/permission/ArbitrableAddressList.sol @@ -662,6 +662,19 @@ contract ArbitrableAddressList is PermissionInterface, Arbitrable { return addr.status == AddressStatus.Registered || addr.status == AddressStatus.ClearingRequested; } + /** @dev Returns address status and number of requests. + * @param _address The address of the queried token. + * @return The address information. + */ + function getAddressInfo(address _address) + external + view + returns (AddressStatus status, uint numberOfRequests) + { + Address storage addr = addresses[_address]; + return (addr.status, addr.requests.length); + } + /* Internal */ /**