diff --git a/src/precompiles/ArbMathStats.sol b/src/precompiles/ArbMathStats.sol new file mode 100644 index 00000000..59fbed7b --- /dev/null +++ b/src/precompiles/ArbMathStats.sol @@ -0,0 +1,16 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity >=0.4.21 <0.9.0; + +/// @title Statistics +/// @notice This contract is used to compute statistics. +/// This custom contract will set on 0x000000000000000000000000000000000000011b since we set it in precompile.go. +interface ArbMathStats { + /** + * @notice Returns the standard deviation of input + * @return stddev floating point number represented as an int, with the given number of decimals taken + */ + function stdDev(int32[] memory input, uint8 returnDecimals) external pure returns (int256); +} \ No newline at end of file