Skip to content

Commit

Permalink
Remove stash and proxy functionality.
Browse files Browse the repository at this point in the history
  • Loading branch information
ethernomad committed Sep 14, 2022
1 parent 7b2f4ad commit b1f420f
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 2,948 deletions.
51 changes: 0 additions & 51 deletions src/AcuityAccount.sol
Expand Up @@ -8,25 +8,13 @@ contract AcuityAccount {
*/
mapping (address => bytes32) accountAcuAccount;

/**
* @dev Mapping of account to proxy account.
*/
mapping (address => address) accountProxyAccount;

/**
* @dev ACU account has been set for an account.
* @param account Account that has set its ACU account.
* @param acuAccount ACU account that has been set for account.
*/
event AcuAccountSet(address indexed account, bytes32 indexed acuAccount);

/**
* @dev Proxy account has been set for an account.
* @param account Account that has set its Proxy account.
* @param proxyAccount Proxy account that has been set for account.
*/
event ProxyAccountSet(address indexed account, address indexed proxyAccount);

/**
* @dev Set Acu account for sender.
* @param acuAccount ACU account to set for sender.
Expand All @@ -38,17 +26,6 @@ contract AcuityAccount {
emit AcuAccountSet(msg.sender, acuAccount);
}

/**
* @dev Set proxy account for sender.
* @param proxyAccount Proxy account to set for sender.
*/
function setProxyAccount(address proxyAccount)
external
{
accountProxyAccount[msg.sender] = proxyAccount;
emit ProxyAccountSet(msg.sender, proxyAccount);
}

/**
* @dev Get ACU account for account.
* @param account Account to get ACU account for.
Expand All @@ -62,32 +39,4 @@ contract AcuityAccount {
acuAccount = accountAcuAccount[account];
}

/**
* @dev Get proxy account for account.
* @param account Account to get proxy account for.
* @return proxyAccount Proxy account for account.
*/
function getProxyAccount(address account)
external
view
returns (address proxyAccount)
{
proxyAccount = accountProxyAccount[account];
}

/**
* @dev Get accounts for account.
* @param account Account to get accounts for.
* @return acuAccount ACU account for account.
* @return proxyAccount Proxy account for account.
*/
function getAccounts(address account)
external
view
returns (bytes32 acuAccount, address proxyAccount)
{
acuAccount = accountAcuAccount[account];
proxyAccount = accountProxyAccount[account];
}

}
14 changes: 0 additions & 14 deletions src/AcuityAccount.t.sol
Expand Up @@ -16,18 +16,4 @@ contract AcuityAccountTest is DSTest {
acuityAccount.setAcuAccount(hex"1234");
}

function testSetProxyAccount() public {
acuityAccount.setProxyAccount(address(0x2345));
assertEq(acuityAccount.getProxyAccount(address(this)), address(0x2345));
}

function testGetAccounts() public {
acuityAccount.setAcuAccount(hex"1234");
acuityAccount.setProxyAccount(address(0x2345));

(bytes32 acuAccount, address proxyAccount) = acuityAccount.getAccounts(address(this));
assertEq(acuAccount, hex"1234");
assertEq(proxyAccount, address(0x2345));
}

}

0 comments on commit b1f420f

Please sign in to comment.