Updated core resolver

This commit is contained in:
Thrilok Kumar 2020-05-14 22:52:37 +05:30
parent abf1adcd03
commit acb4801bc9

View File

@ -144,6 +144,13 @@ contract AccountResolver is Helpers {
uint[] versions;
}
struct AccountData {
uint ID;
address account;
uint version;
address[] authorities;
}
function getAuthorityDetails(address authority) public view returns(AuthorityData memory){
address[] memory accounts = getAuthorityAccounts(authority);
return AuthorityData(
@ -153,6 +160,26 @@ contract AccountResolver is Helpers {
);
}
function getAccountIdDetails(uint id) public view returns(AccountData memory){
address account = getAccount(uint64(id));
return AccountData(
id,
account,
AccountInterface(account).version(),
getIDAuthorities(id)
);
}
function getAccountDetails(address account) public view returns(AccountData memory){
uint id = getID(account);
return AccountData(
id,
account,
AccountInterface(account).version(),
getIDAuthorities(id)
);
}
function isShield(address account) public view returns(bool shield) {
shield = AccountInterface(account).sheild();
}
@ -225,8 +252,8 @@ contract ConnectorsResolver is AccountResolver {
}
contract DSA_Resolver is ConnectorsResolver {
string public constant name = "DSA_Resolver_v1";
contract InstaDSAResolver is ConnectorsResolver {
string public constant name = "DSA-Resolver-v1";
uint public constant version = 1;
constructor(address _index) public{