Quick smart contract fixes
This commit is contained in:
parent
ac9bc6fa46
commit
4403541660
@ -2,7 +2,6 @@
|
|||||||
pragma solidity 0.8.9;
|
pragma solidity 0.8.9;
|
||||||
|
|
||||||
interface EventAndErrors {
|
interface EventAndErrors {
|
||||||
// bytes32 constant DEPOSIT_ADDED_SIGNATURE =
|
|
||||||
|
|
||||||
/// ███ Events ████████████████████████████████████████████████████████████
|
/// ███ Events ████████████████████████████████████████████████████████████
|
||||||
|
|
||||||
@ -85,4 +84,7 @@ interface EventAndErrors {
|
|||||||
/// @dev Wished amount to be locked exceeds the limit allowed.
|
/// @dev Wished amount to be locked exceeds the limit allowed.
|
||||||
/// @dev 0x1c18f846
|
/// @dev 0x1c18f846
|
||||||
error AmountNotAllowed();
|
error AmountNotAllowed();
|
||||||
|
/// @dev Reverts when success return value returns false.
|
||||||
|
/// @dev 0xe10bf1cc
|
||||||
|
error StaticCallFailed();
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ contract P2PIX is
|
|||||||
/// from the total `remaining` value.
|
/// from the total `remaining` value.
|
||||||
/// @dev Locks can only be performed in valid orders.
|
/// @dev Locks can only be performed in valid orders.
|
||||||
/// @param _buyerAddress The address of the buyer of a `_depositID`.
|
/// @param _buyerAddress The address of the buyer of a `_depositID`.
|
||||||
/// @param _relayerTarget Target address entitled to the `relayerPremim`.
|
/// @param _relayerTarget Target address entitled to the `relayerPremium`.
|
||||||
/// @param _relayerPremium The refund/premium owed to a relayer.
|
/// @param _relayerPremium The refund/premium owed to a relayer.
|
||||||
/// @param _amount The deposit's remaining amount wished to be locked.
|
/// @param _amount The deposit's remaining amount wished to be locked.
|
||||||
/// @param merkleProof This value should be:
|
/// @param merkleProof This value should be:
|
||||||
@ -659,6 +659,11 @@ contract P2PIX is
|
|||||||
returnSize := returndatasize()
|
returnSize := returndatasize()
|
||||||
returnValue := mload(0x00)
|
returnValue := mload(0x00)
|
||||||
_spendLimit := returnValue
|
_spendLimit := returnValue
|
||||||
|
// reverts if call does not succeed.
|
||||||
|
if iszero(success) {
|
||||||
|
mstore(0x00, 0xe10bf1cc)
|
||||||
|
revert(0x1c, 0x04)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user