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

file-level constants and free functions not supported #372

Closed
gitpusha opened this issue Nov 2, 2020 · 1 comment
Closed

file-level constants and free functions not supported #372

gitpusha opened this issue Nov 2, 2020 · 1 comment

Comments

@gitpusha
Copy link

gitpusha commented Nov 2, 2020

Hi,

The plugin doesnt seem to support formatting for solidity file-level constants or functions like these ones:

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.7.4;

import {
    IGelatoGasPriceOracle
} from "../interfaces/Gelato/IGelatoGasPriceOracle.sol";

IGelatoGasPriceOracle constant GELATO_GAS_PRICE_ORACLE = IGelatoGasPriceOracle(0x169E633A2D1E6c10dD91238Ba11c4A708dfEF37C);
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.7.4;

import {GELATO_GAS_PRICE_ORACLE} = import "../constants/CGelato.sol";
import {mul} from "../vendor/DSMath.sol";


function _getGelatoGasPrice() view returns (uint256) {
    return uint256(GELATO_GAS_PRICE_ORACLE.latestAnswer());
}

function _getGelatoProviderFees(uint256 _gas) view returns (uint256) {
    return mul(_gas, _getGelatoGasPrice());
}
@fvictorio
Copy link
Member

Fixed in #378.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants