Skip to content

Commit

Permalink
mv ChainSpecificUtil to lib
Browse files Browse the repository at this point in the history
  • Loading branch information
RensR authored and justinkaseman committed Nov 13, 2023
1 parent 8300e4e commit 76dc6eb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ pragma solidity ^0.8.19;
import {IFunctionsCoordinator} from "./interfaces/IFunctionsCoordinator.sol";
import {ITypeAndVersion} from "../../../shared/interfaces/ITypeAndVersion.sol";

<<<<<<< HEAD
import {FunctionsBilling} from "./FunctionsBilling.sol";
=======
import {ChainSpecificUtil} from "./libraries/ChainSpecificUtil.sol";
import {Routable} from "./Routable.sol";
>>>>>>> 49d26b4eca (mv ChainSpecificUtil to lib)
import {OCR2Base} from "./ocr/OCR2Base.sol";
import {FunctionsResponse} from "./libraries/FunctionsResponse.sol";

Expand Down
8 changes: 2 additions & 6 deletions contracts/src/v0.8/functions/dev/v1_X/FunctionsRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -403,12 +403,8 @@ contract FunctionsRouter is IFunctionsRouter, FunctionsSubscriptions, Pausable,
uint32 callbackGasLimit,
address client
) private returns (CallbackResult memory) {
bool destinationNoLongerExists;
assembly {
// solidity calls check that a contract actually exists at the destination, so we do the same
destinationNoLongerExists := iszero(extcodesize(client))
}
if (destinationNoLongerExists) {
// solidity calls check that a contract actually exists at the destination, so we do the same
if (client.code.length == 0) {
// Return without attempting callback
// The subscription will still be charged to reimburse transmitter's gas overhead
return CallbackResult({success: false, gasUsed: 0, returnData: new bytes(0)});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import {ArbGasInfo} from "../../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbGasInfo.sol";
import {OVM_GasPriceOracle} from "../../../vendor/@eth-optimism/contracts/v0.8.9/contracts/L2/predeploys/OVM_GasPriceOracle.sol";
import {ArbGasInfo} from "../../../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbGasInfo.sol";
import {OVM_GasPriceOracle} from "../../../../vendor/@eth-optimism/contracts/v0.8.9/contracts/L2/predeploys/OVM_GasPriceOracle.sol";

/// @dev A library that abstracts out opcodes that behave differently across chains.
/// @dev The methods below return values that are pertinent to the given chain.
Expand Down

0 comments on commit 76dc6eb

Please sign in to comment.