Skip to content

Commit

Permalink
fix: remove l1 fee logic
Browse files Browse the repository at this point in the history
  • Loading branch information
KodeyThomas committed Dec 18, 2024
1 parent 0df587a commit a0310bf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ pragma solidity ^0.8.19;

import {IFunctionsSubscriptions} from "../v1_0_0/interfaces/IFunctionsSubscriptions.sol";
import {AggregatorV3Interface} from "../../shared/interfaces/AggregatorV3Interface.sol";
import {IFunctionsBilling, FunctionsBillingConfig} from "./interfaces/IFunctionsBilling.sol";
import {ZKSyncChainSpecificUtil} from "./libraries/ZKSyncChainSpecificUtil.sol";
import {IFunctionsBilling, FunctionsBillingConfig} from "../v1_0_0/interfaces/IFunctionsBilling.sol";

import {Routable} from "../v1_0_0/Routable.sol";
import {FunctionsResponse} from "../v1_0_0/libraries/FunctionsResponse.sol";
Expand Down Expand Up @@ -201,8 +200,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling {
/// @NOTE: Basis Points are 1/100th of 1%, divide by 10_000 to bring back to original units

uint256 executionGas = s_config.gasOverheadBeforeCallback + s_config.gasOverheadAfterCallback + callbackGasLimit;
uint256 l1FeeWei = ZKSyncChainSpecificUtil._getCurrentTxL1GasFees();
uint96 estimatedGasReimbursementJuels = _getJuelsFromWei((gasPriceWithOverestimation * executionGas) + l1FeeWei);
uint96 estimatedGasReimbursementJuels = _getJuelsFromWei(gasPriceWithOverestimation * executionGas);

uint96 feesJuels = uint96(donFeeJuels) + uint96(adminFeeJuels) + uint96(operationFeeJuels);

Expand Down Expand Up @@ -295,10 +293,9 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling {
FunctionsResponse.Commitment memory commitment = abi.decode(onchainMetadata, (FunctionsResponse.Commitment));

uint256 gasOverheadWei = (commitment.gasOverheadBeforeCallback + commitment.gasOverheadAfterCallback) * tx.gasprice;
uint256 l1FeeShareWei = ZKSyncChainSpecificUtil._getCurrentTxL1GasFees() / reportBatchSize;

// Gas overhead without callback
uint96 gasOverheadJuels = _getJuelsFromWei(gasOverheadWei + l1FeeShareWei);
uint96 gasOverheadJuels = _getJuelsFromWei(gasOverheadWei);
uint96 juelsPerGas = _getJuelsFromWei(tx.gasprice);

// The Functions Router will perform the callback to the client contract
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit a0310bf

Please sign in to comment.