Transpile 7bce2b72
This commit is contained in:
53
contracts/utils/math/MathUpgradeable.sol
Normal file
53
contracts/utils/math/MathUpgradeable.sol
Normal file
@ -0,0 +1,53 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/math/Math.sol)
|
||||
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
/**
|
||||
* @dev Standard math utilities missing in the Solidity language.
|
||||
*/
|
||||
library MathUpgradeable {
|
||||
/**
|
||||
* @dev Returns the largest of two numbers.
|
||||
*/
|
||||
function max(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||
return a >= b ? a : b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the smallest of two numbers.
|
||||
*/
|
||||
function min(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||
return a < b ? a : b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the average of two numbers. The result is rounded towards
|
||||
* zero.
|
||||
*/
|
||||
function average(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||
// (a + b) / 2 can overflow.
|
||||
return (a & b) + (a ^ b) / 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the ceiling of the division of two numbers.
|
||||
*
|
||||
* This differs from standard division with `/` in that it rounds up instead
|
||||
* of rounding down.
|
||||
*/
|
||||
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||
// (a + b - 1) / b can overflow on addition, so we distribute.
|
||||
return a / b + (a % b == 0 ? 0 : 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the absolute unsigned value of a signed value.
|
||||
*/
|
||||
function abs(int256 n) internal pure returns (uint256) {
|
||||
unchecked {
|
||||
// must be unchecked in order to support `n = type(int256).min`
|
||||
return uint256(n >= 0 ? n : -n);
|
||||
}
|
||||
}
|
||||
}
|
||||
241
contracts/utils/math/SafeCastUpgradeable.sol
Normal file
241
contracts/utils/math/SafeCastUpgradeable.sol
Normal file
@ -0,0 +1,241 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol)
|
||||
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
/**
|
||||
* @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
|
||||
* checks.
|
||||
*
|
||||
* Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
|
||||
* easily result in undesired exploitation or bugs, since developers usually
|
||||
* assume that overflows raise errors. `SafeCast` restores this intuition by
|
||||
* reverting the transaction when such an operation overflows.
|
||||
*
|
||||
* Using this library instead of the unchecked operations eliminates an entire
|
||||
* class of bugs, so it's recommended to use it always.
|
||||
*
|
||||
* Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
|
||||
* all math on `uint256` and `int256` and then downcasting.
|
||||
*/
|
||||
library SafeCastUpgradeable {
|
||||
/**
|
||||
* @dev Returns the downcasted uint224 from uint256, reverting on
|
||||
* overflow (when the input is greater than largest uint224).
|
||||
*
|
||||
* Counterpart to Solidity's `uint224` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 224 bits
|
||||
*/
|
||||
function toUint224(uint256 value) internal pure returns (uint224) {
|
||||
require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits");
|
||||
return uint224(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the downcasted uint128 from uint256, reverting on
|
||||
* overflow (when the input is greater than largest uint128).
|
||||
*
|
||||
* Counterpart to Solidity's `uint128` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 128 bits
|
||||
*/
|
||||
function toUint128(uint256 value) internal pure returns (uint128) {
|
||||
require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits");
|
||||
return uint128(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the downcasted uint96 from uint256, reverting on
|
||||
* overflow (when the input is greater than largest uint96).
|
||||
*
|
||||
* Counterpart to Solidity's `uint96` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 96 bits
|
||||
*/
|
||||
function toUint96(uint256 value) internal pure returns (uint96) {
|
||||
require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits");
|
||||
return uint96(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the downcasted uint64 from uint256, reverting on
|
||||
* overflow (when the input is greater than largest uint64).
|
||||
*
|
||||
* Counterpart to Solidity's `uint64` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 64 bits
|
||||
*/
|
||||
function toUint64(uint256 value) internal pure returns (uint64) {
|
||||
require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits");
|
||||
return uint64(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the downcasted uint32 from uint256, reverting on
|
||||
* overflow (when the input is greater than largest uint32).
|
||||
*
|
||||
* Counterpart to Solidity's `uint32` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 32 bits
|
||||
*/
|
||||
function toUint32(uint256 value) internal pure returns (uint32) {
|
||||
require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits");
|
||||
return uint32(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the downcasted uint16 from uint256, reverting on
|
||||
* overflow (when the input is greater than largest uint16).
|
||||
*
|
||||
* Counterpart to Solidity's `uint16` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 16 bits
|
||||
*/
|
||||
function toUint16(uint256 value) internal pure returns (uint16) {
|
||||
require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits");
|
||||
return uint16(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the downcasted uint8 from uint256, reverting on
|
||||
* overflow (when the input is greater than largest uint8).
|
||||
*
|
||||
* Counterpart to Solidity's `uint8` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 8 bits.
|
||||
*/
|
||||
function toUint8(uint256 value) internal pure returns (uint8) {
|
||||
require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits");
|
||||
return uint8(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Converts a signed int256 into an unsigned uint256.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - input must be greater than or equal to 0.
|
||||
*/
|
||||
function toUint256(int256 value) internal pure returns (uint256) {
|
||||
require(value >= 0, "SafeCast: value must be positive");
|
||||
return uint256(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the downcasted int128 from int256, reverting on
|
||||
* overflow (when the input is less than smallest int128 or
|
||||
* greater than largest int128).
|
||||
*
|
||||
* Counterpart to Solidity's `int128` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 128 bits
|
||||
*
|
||||
* _Available since v3.1._
|
||||
*/
|
||||
function toInt128(int256 value) internal pure returns (int128) {
|
||||
require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits");
|
||||
return int128(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the downcasted int64 from int256, reverting on
|
||||
* overflow (when the input is less than smallest int64 or
|
||||
* greater than largest int64).
|
||||
*
|
||||
* Counterpart to Solidity's `int64` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 64 bits
|
||||
*
|
||||
* _Available since v3.1._
|
||||
*/
|
||||
function toInt64(int256 value) internal pure returns (int64) {
|
||||
require(value >= type(int64).min && value <= type(int64).max, "SafeCast: value doesn't fit in 64 bits");
|
||||
return int64(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the downcasted int32 from int256, reverting on
|
||||
* overflow (when the input is less than smallest int32 or
|
||||
* greater than largest int32).
|
||||
*
|
||||
* Counterpart to Solidity's `int32` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 32 bits
|
||||
*
|
||||
* _Available since v3.1._
|
||||
*/
|
||||
function toInt32(int256 value) internal pure returns (int32) {
|
||||
require(value >= type(int32).min && value <= type(int32).max, "SafeCast: value doesn't fit in 32 bits");
|
||||
return int32(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the downcasted int16 from int256, reverting on
|
||||
* overflow (when the input is less than smallest int16 or
|
||||
* greater than largest int16).
|
||||
*
|
||||
* Counterpart to Solidity's `int16` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 16 bits
|
||||
*
|
||||
* _Available since v3.1._
|
||||
*/
|
||||
function toInt16(int256 value) internal pure returns (int16) {
|
||||
require(value >= type(int16).min && value <= type(int16).max, "SafeCast: value doesn't fit in 16 bits");
|
||||
return int16(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the downcasted int8 from int256, reverting on
|
||||
* overflow (when the input is less than smallest int8 or
|
||||
* greater than largest int8).
|
||||
*
|
||||
* Counterpart to Solidity's `int8` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - input must fit into 8 bits.
|
||||
*
|
||||
* _Available since v3.1._
|
||||
*/
|
||||
function toInt8(int256 value) internal pure returns (int8) {
|
||||
require(value >= type(int8).min && value <= type(int8).max, "SafeCast: value doesn't fit in 8 bits");
|
||||
return int8(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Converts an unsigned uint256 into a signed int256.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - input must be less than or equal to maxInt256.
|
||||
*/
|
||||
function toInt256(uint256 value) internal pure returns (int256) {
|
||||
// Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
|
||||
require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256");
|
||||
return int256(value);
|
||||
}
|
||||
}
|
||||
227
contracts/utils/math/SafeMathUpgradeable.sol
Normal file
227
contracts/utils/math/SafeMathUpgradeable.sol
Normal file
@ -0,0 +1,227 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)
|
||||
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
// CAUTION
|
||||
// This version of SafeMath should only be used with Solidity 0.8 or later,
|
||||
// because it relies on the compiler's built in overflow checks.
|
||||
|
||||
/**
|
||||
* @dev Wrappers over Solidity's arithmetic operations.
|
||||
*
|
||||
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
|
||||
* now has built in overflow checking.
|
||||
*/
|
||||
library SafeMathUpgradeable {
|
||||
/**
|
||||
* @dev Returns the addition of two unsigned integers, with an overflow flag.
|
||||
*
|
||||
* _Available since v3.4._
|
||||
*/
|
||||
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
|
||||
unchecked {
|
||||
uint256 c = a + b;
|
||||
if (c < a) return (false, 0);
|
||||
return (true, c);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
|
||||
*
|
||||
* _Available since v3.4._
|
||||
*/
|
||||
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
|
||||
unchecked {
|
||||
if (b > a) return (false, 0);
|
||||
return (true, a - b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
|
||||
*
|
||||
* _Available since v3.4._
|
||||
*/
|
||||
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
|
||||
unchecked {
|
||||
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
|
||||
// benefit is lost if 'b' is also tested.
|
||||
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
|
||||
if (a == 0) return (true, 0);
|
||||
uint256 c = a * b;
|
||||
if (c / a != b) return (false, 0);
|
||||
return (true, c);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the division of two unsigned integers, with a division by zero flag.
|
||||
*
|
||||
* _Available since v3.4._
|
||||
*/
|
||||
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
|
||||
unchecked {
|
||||
if (b == 0) return (false, 0);
|
||||
return (true, a / b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
|
||||
*
|
||||
* _Available since v3.4._
|
||||
*/
|
||||
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
|
||||
unchecked {
|
||||
if (b == 0) return (false, 0);
|
||||
return (true, a % b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the addition of two unsigned integers, reverting on
|
||||
* overflow.
|
||||
*
|
||||
* Counterpart to Solidity's `+` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - Addition cannot overflow.
|
||||
*/
|
||||
function add(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the subtraction of two unsigned integers, reverting on
|
||||
* overflow (when the result is negative).
|
||||
*
|
||||
* Counterpart to Solidity's `-` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - Subtraction cannot overflow.
|
||||
*/
|
||||
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||
return a - b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the multiplication of two unsigned integers, reverting on
|
||||
* overflow.
|
||||
*
|
||||
* Counterpart to Solidity's `*` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - Multiplication cannot overflow.
|
||||
*/
|
||||
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||
return a * b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the integer division of two unsigned integers, reverting on
|
||||
* division by zero. The result is rounded towards zero.
|
||||
*
|
||||
* Counterpart to Solidity's `/` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - The divisor cannot be zero.
|
||||
*/
|
||||
function div(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||
return a / b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
|
||||
* reverting when dividing by zero.
|
||||
*
|
||||
* Counterpart to Solidity's `%` operator. This function uses a `revert`
|
||||
* opcode (which leaves remaining gas untouched) while Solidity uses an
|
||||
* invalid opcode to revert (consuming all remaining gas).
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - The divisor cannot be zero.
|
||||
*/
|
||||
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||
return a % b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
|
||||
* overflow (when the result is negative).
|
||||
*
|
||||
* CAUTION: This function is deprecated because it requires allocating memory for the error
|
||||
* message unnecessarily. For custom revert reasons use {trySub}.
|
||||
*
|
||||
* Counterpart to Solidity's `-` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - Subtraction cannot overflow.
|
||||
*/
|
||||
function sub(
|
||||
uint256 a,
|
||||
uint256 b,
|
||||
string memory errorMessage
|
||||
) internal pure returns (uint256) {
|
||||
unchecked {
|
||||
require(b <= a, errorMessage);
|
||||
return a - b;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
|
||||
* division by zero. The result is rounded towards zero.
|
||||
*
|
||||
* Counterpart to Solidity's `/` operator. Note: this function uses a
|
||||
* `revert` opcode (which leaves remaining gas untouched) while Solidity
|
||||
* uses an invalid opcode to revert (consuming all remaining gas).
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - The divisor cannot be zero.
|
||||
*/
|
||||
function div(
|
||||
uint256 a,
|
||||
uint256 b,
|
||||
string memory errorMessage
|
||||
) internal pure returns (uint256) {
|
||||
unchecked {
|
||||
require(b > 0, errorMessage);
|
||||
return a / b;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
|
||||
* reverting with custom message when dividing by zero.
|
||||
*
|
||||
* CAUTION: This function is deprecated because it requires allocating memory for the error
|
||||
* message unnecessarily. For custom revert reasons use {tryMod}.
|
||||
*
|
||||
* Counterpart to Solidity's `%` operator. This function uses a `revert`
|
||||
* opcode (which leaves remaining gas untouched) while Solidity uses an
|
||||
* invalid opcode to revert (consuming all remaining gas).
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - The divisor cannot be zero.
|
||||
*/
|
||||
function mod(
|
||||
uint256 a,
|
||||
uint256 b,
|
||||
string memory errorMessage
|
||||
) internal pure returns (uint256) {
|
||||
unchecked {
|
||||
require(b > 0, errorMessage);
|
||||
return a % b;
|
||||
}
|
||||
}
|
||||
}
|
||||
33
contracts/utils/math/SignedMathUpgradeable.sol
Normal file
33
contracts/utils/math/SignedMathUpgradeable.sol
Normal file
@ -0,0 +1,33 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/math/SignedMath.sol)
|
||||
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
/**
|
||||
* @dev Standard signed math utilities missing in the Solidity language.
|
||||
*/
|
||||
library SignedMathUpgradeable {
|
||||
/**
|
||||
* @dev Returns the largest of two signed numbers.
|
||||
*/
|
||||
function max(int256 a, int256 b) internal pure returns (int256) {
|
||||
return a >= b ? a : b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the smallest of two signed numbers.
|
||||
*/
|
||||
function min(int256 a, int256 b) internal pure returns (int256) {
|
||||
return a < b ? a : b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the average of two signed numbers without overflow.
|
||||
* The result is rounded towards zero.
|
||||
*/
|
||||
function average(int256 a, int256 b) internal pure returns (int256) {
|
||||
// Formula from the book "Hacker's Delight"
|
||||
int256 x = (a & b) + ((a ^ b) >> 1);
|
||||
return x + (int256(uint256(x) >> 255) & (a ^ b));
|
||||
}
|
||||
}
|
||||
68
contracts/utils/math/SignedSafeMathUpgradeable.sol
Normal file
68
contracts/utils/math/SignedSafeMathUpgradeable.sol
Normal file
@ -0,0 +1,68 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// OpenZeppelin Contracts v4.4.1 (utils/math/SignedSafeMath.sol)
|
||||
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
/**
|
||||
* @dev Wrappers over Solidity's arithmetic operations.
|
||||
*
|
||||
* NOTE: `SignedSafeMath` is no longer needed starting with Solidity 0.8. The compiler
|
||||
* now has built in overflow checking.
|
||||
*/
|
||||
library SignedSafeMathUpgradeable {
|
||||
/**
|
||||
* @dev Returns the multiplication of two signed integers, reverting on
|
||||
* overflow.
|
||||
*
|
||||
* Counterpart to Solidity's `*` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - Multiplication cannot overflow.
|
||||
*/
|
||||
function mul(int256 a, int256 b) internal pure returns (int256) {
|
||||
return a * b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the integer division of two signed integers. Reverts on
|
||||
* division by zero. The result is rounded towards zero.
|
||||
*
|
||||
* Counterpart to Solidity's `/` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - The divisor cannot be zero.
|
||||
*/
|
||||
function div(int256 a, int256 b) internal pure returns (int256) {
|
||||
return a / b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the subtraction of two signed integers, reverting on
|
||||
* overflow.
|
||||
*
|
||||
* Counterpart to Solidity's `-` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - Subtraction cannot overflow.
|
||||
*/
|
||||
function sub(int256 a, int256 b) internal pure returns (int256) {
|
||||
return a - b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the addition of two signed integers, reverting on
|
||||
* overflow.
|
||||
*
|
||||
* Counterpart to Solidity's `+` operator.
|
||||
*
|
||||
* Requirements:
|
||||
*
|
||||
* - Addition cannot overflow.
|
||||
*/
|
||||
function add(int256 a, int256 b) internal pure returns (int256) {
|
||||
return a + b;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user