mirror of
https://github.com/Instadapp/dsa-resolvers-deprecated.git
synced 2024-07-29 22:38:16 +00:00
Updated core resolver
This commit is contained in:
parent
abf1adcd03
commit
acb4801bc9
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue
Block a user