Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nonReentrant modifier order #327

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ contract ArbitrationPolicyUMA is
/// @dev Enforced to be only callable by the DisputeModule
/// @param caller Address of the caller
/// @param data The arbitrary data used to raise the dispute
function onRaiseDispute(address caller, bytes calldata data) external onlyDisputeModule nonReentrant whenNotPaused {
function onRaiseDispute(address caller, bytes calldata data) external nonReentrant onlyDisputeModule whenNotPaused {
(bytes memory claim, uint64 liveness, address currency, uint256 bond, bytes32 identifier) = abi.decode(
data,
(bytes, uint64, address, uint256, bytes32)
Expand Down
4 changes: 2 additions & 2 deletions contracts/modules/licensing/LicensingModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ contract LicensingModule is
address receiver,
bytes calldata royaltyContext,
uint256 maxMintingFee
) external whenNotPaused nonReentrant returns (uint256 startLicenseTokenId) {
) external nonReentrant whenNotPaused returns (uint256 startLicenseTokenId) {
if (amount == 0) {
revert Errors.LicensingModule__MintAmountZero();
}
Expand Down Expand Up @@ -256,7 +256,7 @@ contract LicensingModule is
bytes calldata royaltyContext,
uint256 maxMintingFee,
uint32 maxRts
) external whenNotPaused nonReentrant verifyPermission(childIpId) {
) external nonReentrant whenNotPaused verifyPermission(childIpId) {
if (parentIpIds.length != licenseTermsIds.length) {
revert Errors.LicensingModule__LicenseTermsLengthMismatch(parentIpIds.length, licenseTermsIds.length);
}
Expand Down
4 changes: 2 additions & 2 deletions contracts/modules/royalty/policies/LAP/RoyaltyPolicyLAP.sol
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ contract RoyaltyPolicyLAP is
address ipId,
uint32 licensePercent,
bytes calldata
) external onlyRoyaltyModule nonReentrant {
) external nonReentrant onlyRoyaltyModule {
IRoyaltyModule royaltyModule = ROYALTY_MODULE;
if (royaltyModule.globalRoyaltyStack(ipId) + licensePercent > royaltyModule.maxPercent())
revert Errors.RoyaltyPolicyLAP__AboveMaxPercent();
Expand All @@ -105,7 +105,7 @@ contract RoyaltyPolicyLAP is
address[] memory licenseRoyaltyPolicies,
uint32[] calldata licensesPercent,
bytes calldata
) external onlyRoyaltyModule nonReentrant returns (uint32 newRoyaltyStackLAP) {
) external nonReentrant onlyRoyaltyModule returns (uint32 newRoyaltyStackLAP) {
IP_GRAPH_ACL.allow();
for (uint256 i = 0; i < parentIpIds.length; i++) {
// when a parent is linking through a different royalty policy, the royalty amount is zero
Expand Down
4 changes: 2 additions & 2 deletions contracts/modules/royalty/policies/LRP/RoyaltyPolicyLRP.sol
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ contract RoyaltyPolicyLRP is
address ipId,
uint32 licensePercent,
bytes calldata
) external onlyRoyaltyModule nonReentrant {
) external nonReentrant onlyRoyaltyModule {
if (ROYALTY_POLICY_LAP.getPolicyRoyaltyStack(ipId) + licensePercent > ROYALTY_MODULE.maxPercent())
revert Errors.RoyaltyPolicyLRP__AboveMaxPercent();
}
Expand All @@ -132,7 +132,7 @@ contract RoyaltyPolicyLRP is
address[] memory licenseRoyaltyPolicies,
uint32[] calldata licensesPercent,
bytes calldata
) external onlyRoyaltyModule nonReentrant returns (uint32 newRoyaltyStackLRP) {
) external nonReentrant onlyRoyaltyModule returns (uint32 newRoyaltyStackLRP) {
IP_GRAPH_ACL.allow();
for (uint256 i = 0; i < parentIpIds.length; i++) {
// when a parent is linking through a different royalty policy, the royalty amount is zero
Expand Down
Loading