Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/precompiles/ArbMathStats.sol
Original file line number Diff line number Diff line change
@@ -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);
}