Skip to content

Commit

Permalink
making _assertCallerHasAccess virtual (#19)
Browse files Browse the repository at this point in the history
* making _assertCallerHasAccess virtual

* fmt
  • Loading branch information
dsshap authored Apr 2, 2024
1 parent a38e664 commit ae3e1cf
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/config/enums.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ enum ActionType {
TransferLong, // transfer long directly to another subAccount
TransferShort, // transfer short directly to another subAccount
BurnShortInAccount // decreases short position in one subAccount, decreases long position in another

}
1 change: 0 additions & 1 deletion src/core/Pomace.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import "../config/errors.sol";
* @author @dsshap, @antoncoding
* @dev This contract serves as the registry of the system who system.
*/

contract Pomace is OwnableUpgradeable, ReentrancyGuardUpgradeable, UUPSUpgradeable {
using BalanceUtil for Balance[];
using FixedPointMathLib for uint256;
Expand Down
3 changes: 1 addition & 2 deletions src/core/engines/BaseEngine.sol
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ abstract contract BaseEngine {
* Constructor
* ========================================================= *
*/

constructor(address _pomace, address _optionToken) {
pomace = IPomace(_pomace);
optionToken = IPhysicalOptionToken(_optionToken);
Expand Down Expand Up @@ -371,7 +370,7 @@ abstract contract BaseEngine {
* @notice revert if the msg.sender is not authorized to access an subAccount id
* @param _subAccount subaccount id
*/
function _assertCallerHasAccess(address _subAccount) internal {
function _assertCallerHasAccess(address _subAccount) internal virtual {
if (_isPrimaryAccountFor(msg.sender, _subAccount)) return;

// the sender is not the direct owner. check if they're authorized
Expand Down
1 change: 0 additions & 1 deletion src/libraries/TokenIdUtil.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import "../config/errors.sol";
* | tokenType (32 bits) | productId (32 bits) | expiry (64 bits) | strike (64 bits) | exerciseWindow (64 bits) |
* * ------------------- | ------------------- | ---------------- | ---------------- | -------------------------- *
*/

library TokenIdUtil {
/**
* @notice calculate ERC1155 token id for given option parameters. See table above for tokenId
Expand Down

0 comments on commit ae3e1cf

Please sign in to comment.