이 비교의 나머지 부분을 불러오는 중입니다.

Diff between PyUSD implementation 1 and current implementation

생성일 비교 결과 만료 없음
13 삭제
645 행
13 추가
644 행
/**
/**
*Submitted for verification at Etherscan.io on 2023-01-23
*Submitted for verification at Etherscan.io on 2023-08-07
*/
*/


// File: contracts/zeppelin/SafeMath.sol
// File: contracts/zeppelin/SafeMath.sol


pragma solidity ^0.4.24;
pragma solidity ^0.4.24;




/**
/**
* @title SafeMath
* @title SafeMath
* @dev Math operations with safety checks that throw on error
* @dev Math operations with safety checks that throw on error
*/
*/
library SafeMath {
library SafeMath {
/**
/**
* @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
* @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a);
require(b <= a);
uint256 c = a - b;
uint256 c = a - b;


return c;
return c;
}
}


/**
/**
* @dev Adds two numbers, reverts on overflow.
* @dev Adds two numbers, reverts on overflow.
*/
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
uint256 c = a + b;
require(c >= a);
require(c >= a);


return c;
return c;
}
}
}
}


// File: contracts/XYZImplementation.sol
// File: contracts/PYUSDImplementation.sol


pragma solidity ^0.4.24;
pragma solidity ^0.4.24;
pragma experimental "v0.5.0";
pragma experimental "v0.5.0";






/**
/**
* @title XYZImplementation
* @title PYUSDImplementation
* @dev this contract is a Pausable ERC20 token with Burn and Mint
* @dev this contract is a Pausable ERC20 token with Burn and Mint
* controlled by a central SupplyController. By implementing XYZImplementation
* controlled by a central SupplyController. By implementing PYUSDImplementation
* this contract also includes external methods for setting
* this contract also includes external methods for setting
* a new implementation contract for the Proxy.
* a new implementation contract for the Proxy.
* NOTE: The storage defined here will actually be held in the Proxy
* NOTE: The storage defined here will actually be held in the Proxy
* contract and all calls to this contract should be made through
* contract and all calls to this contract should be made through
* the proxy, including admin actions done as owner or supplyController.
* the proxy, including admin actions done as owner or supplyController.
* Any call to transfer against this contract should fail
* Any call to transfer against this contract should fail
* with insufficient funds since no tokens will be issued there.
* with insufficient funds since no tokens will be issued there.
*/
*/
contract XYZImplementation {
contract PYUSDImplementation {


/**
/**
* MATH
* MATH
*/
*/


using SafeMath for uint256;
using SafeMath for uint256;


/**
/**
* DATA
* DATA
*/
*/


// INITIALIZATION DATA
// INITIALIZATION DATA
bool private initialized;
bool private initialized;


// ERC20 BASIC DATA
// ERC20 BASIC DATA
mapping(address => uint256) internal balances;
mapping(address => uint256) internal balances;
uint256 internal totalSupply_;
uint256 internal totalSupply_;
string public constant name = "Hopper"; // solium-disable-line
string public constant name = "PayPal USD"; // solium-disable-line
string public constant symbol = "XYZ"; // solium-disable-line uppercase
string public constant symbol = "PYUSD"; // solium-disable-line uppercase
uint8 public constant decimals = 6; // solium-disable-line uppercase
uint8 public constant decimals = 6; // solium-disable-line uppercase


// ERC20 DATA
// ERC20 DATA
mapping(address => mapping(address => uint256)) internal allowed;
mapping(address => mapping(address => uint256)) internal allowed;


// OWNER DATA PART 1
// OWNER DATA PART 1
address public owner;
address public owner;


// PAUSABILITY DATA
// PAUSABILITY DATA
bool public paused;
bool public paused;


// ASSET PROTECTION DATA
// ASSET PROTECTION DATA
address public assetProtectionRole;
address public assetProtectionRole;
mapping(address => bool) internal frozen;
mapping(address => bool) internal frozen;


// SUPPLY CONTROL DATA
// SUPPLY CONTROL DATA
address public supplyController;
address public supplyController;


// OWNER DATA PART 2
// OWNER DATA PART 2
address public proposedOwner;
address public proposedOwner;


// DELEGATED TRANSFER DATA
// DELEGATED TRANSFER DATA
address public betaDelegateWhitelister;
address public betaDelegateWhitelister;
mapping(address => bool) internal betaDelegateWhitelist;
mapping(address => bool) internal betaDelegateWhitelist;
mapping(address => uint256) internal nextSeqs;
mapping(address => uint256) internal nextSeqs;
// EIP191 header for EIP712 prefix
// EIP191 header for EIP712 prefix
string constant internal EIP191_HEADER = "\x19\x01";
string constant internal EIP191_HEADER = "\x19\x01";