Skip to content

Commit

Permalink
Propagate
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincheng96 committed Apr 26, 2024
1 parent e3ab834 commit 346e2c6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/quark-core-scripts/src/Paycall.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ contract Paycall {
/// @notice Payment token address
address public immutable paymentTokenAddress;

/// @notice Flag for indicating if reverts from the call should be propogated or swallowed
bool public immutable propogateReverts;
/// @notice Flag for indicating if reverts from the call should be propagated or swallowed
bool public immutable propagateReverts;

/// @notice Constant buffer for gas overhead
/// This is a constant to account for the gas used by the Paycall contract itself that's not tracked by gasleft()
Expand All @@ -42,12 +42,12 @@ contract Paycall {
* @notice Constructor
* @param ethBasedPriceFeedAddress_ Eth based price feed address that follows Chainlink's AggregatorV3Interface correlated to the payment token
* @param paymentTokenAddress_ Payment token address
* @param propogateReverts_ Flag for indicating if reverts from the call should be propogated or swallowed
* @param propagateReverts_ Flag for indicating if reverts from the call should be propagated or swallowed
*/
constructor(address ethBasedPriceFeedAddress_, address paymentTokenAddress_, bool propogateReverts_) {
constructor(address ethBasedPriceFeedAddress_, address paymentTokenAddress_, bool propagateReverts_) {
ethBasedPriceFeedAddress = ethBasedPriceFeedAddress_;
paymentTokenAddress = paymentTokenAddress_;
propogateReverts = propogateReverts_;
propagateReverts = propagateReverts_;
scriptAddress = address(this);

divisorScale = 10
Expand Down Expand Up @@ -75,7 +75,7 @@ contract Paycall {
}

(bool success, bytes memory returnData) = callContract.delegatecall(callData);
if (!success && propogateReverts) {
if (!success && propagateReverts) {
assembly {
revert(add(returnData, 32), mload(returnData))
}
Expand Down

0 comments on commit 346e2c6

Please sign in to comment.