正在加载此比较的其余部分。

wNXM Yield Wars

创建于 差异永不过期
61 删除
700 行
65 添加
705 行
/**
/**
*Submitted for verification at Etherscan.io on 2020-09-09
*Submitted for verification at Etherscan.io on 2020-09-24
*/
*/


/**
pragma solidity 0.5.17;
*Submitted for verification at Etherscan.io on 2020-07-31
*/


/*
/*
____ __ __ __ _
____ __ __ __ _
/ __/__ __ ___ / /_ / / ___ / /_ (_)__ __
/ __/__ __ ___ / /_ / / ___ / /_ (_)__ __
_\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
_\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
/___/
/___/


* Synthetix: YFIRewards.sol
* Synthetix: WARRewards.sol
*
*
* Docs: https://docs.synthetix.io/
* Docs: https://docs.synthetix.io/
*
*
*
*
* MIT License
* MIT License
* ===========
* ===========
*
*
* Copyright (c) 2020 Synthetix
* Copyright (c) 2020 Synthetix
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in all
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
*/


// File: @openzeppelin/contracts/math/Math.sol


pragma solidity ^0.5.0;



/**
/**
* @dev Standard math utilities missing in the Solidity language.
* @dev Standard math utilities missing in the Solidity language.
*/
*/
library Math {
library Math {
/**
/**
* @dev Returns the largest of two numbers.
* @dev Returns the largest of two numbers.
*/
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
return a >= b ? a : b;
}
}


/**
/**
* @dev Returns the smallest of two numbers.
* @dev Returns the smallest of two numbers.
*/
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
return a < b ? a : b;
}
}


/**
/**
* @dev Returns the average of two numbers. The result is rounded towards
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
* zero.
*/
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow, so we distribute
// (a + b) / 2 can overflow, so we distribute
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
}
}
}
}


// File: @openzeppelin/contracts/math/SafeMath.sol


pragma solidity ^0.5.0;



/**
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
* checks.
*
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
* operation overflows.
*
*
* Using this library instead of the unchecked operations eliminates an entire
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
* class of bugs, so it's recommended to use it always.
*/
*/
library SafeMath {
library SafeMath {
/**
/**
* @dev Returns the addition of two unsigned integers, reverting on
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
* overflow.
*
*
* Counterpart to Solidity's `+` operator.
* Counterpart to Solidity's `+` operator.
*
*
* Requirements:
* Requirements:
* - Addition cannot overflow.
* - Addition cannot overflow.
*/
*/