🔧 Inheritance reordering
This commit is contained in:
@@ -585,55 +585,4 @@ contract P2PIX is BaseUtils {
|
||||
}
|
||||
return (sortedIDs, status);
|
||||
}
|
||||
|
||||
function _setSellerBalance(uint256 _sellerKey, ERC20 _erc20, uint256 _packed, bytes32 _pixTarget) private {
|
||||
assembly {
|
||||
mstore(0x20, _erc20)
|
||||
mstore(0x0c, _SELLER_BALANCE_SLOT_SEED)
|
||||
mstore(0x00, shr(12, _sellerKey))
|
||||
let _loc := keccak256(0x0c, 0x34)
|
||||
sstore(add(_loc, 0x01), _packed)
|
||||
sstore(_loc, _pixTarget)
|
||||
}
|
||||
}
|
||||
|
||||
function _setValidState(uint256 _sellerKey, ERC20 _erc20, uint256 _packed) private {
|
||||
assembly {
|
||||
mstore(0x20, _erc20)
|
||||
mstore(0x0c, _SELLER_BALANCE_SLOT_SEED)
|
||||
mstore(0x00, shr(12, _sellerKey))
|
||||
let _loc := keccak256(0x0c, 0x34)
|
||||
sstore(add(_loc, 0x01), _packed)
|
||||
}
|
||||
}
|
||||
|
||||
function _addSellerBalance(uint256 _sellerKey, ERC20 _erc20, uint256 _amount) private {
|
||||
assembly {
|
||||
mstore(0x20, _erc20)
|
||||
mstore(0x0c, _SELLER_BALANCE_SLOT_SEED)
|
||||
mstore(0x00, shr(12, _sellerKey))
|
||||
let _loc := add(keccak256(0x0c, 0x34), 0x01)
|
||||
sstore(_loc, add(sload(_loc), _amount))
|
||||
}
|
||||
}
|
||||
|
||||
function _decSellerBalance(uint256 _sellerKey, ERC20 _erc20, uint256 _amount) private {
|
||||
assembly {
|
||||
mstore(0x20, _erc20)
|
||||
mstore(0x0c, _SELLER_BALANCE_SLOT_SEED)
|
||||
mstore(0x00, shr(12, _sellerKey))
|
||||
let _loc := add(keccak256(0x0c, 0x34), 0x01)
|
||||
sstore(_loc, sub(sload(_loc), _amount))
|
||||
}
|
||||
}
|
||||
|
||||
function __sellerBalance(uint256 _sellerKey, ERC20 _erc20) private view returns(uint256 _packed) {
|
||||
assembly {
|
||||
mstore(0x20, _erc20)
|
||||
mstore(0x0c, _SELLER_BALANCE_SLOT_SEED)
|
||||
mstore(0x00, shr(12, _sellerKey))
|
||||
_packed := sload(add(keccak256(0x0c, 0x34), 0x01))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user