Diff
checker
텍스트
텍스트
이미지
문서
Excel
폴더
Legal
Enterprise
데스크톱
요금제
로그인
데스크톱 앱 다운로드
텍스트 비교
두 텍스트 파일의 차이점을 찾아보세요
도구
기록
실시간 편집
변경 없는 행 숨기기
줄바꿈 비활성화
레이아웃
나란히 보기
합쳐 보기
비교 단위
스마트
단어
글자
구문 강조
언어 선택
제외
텍스트 변환
첫 변경으로
수정
Diffchecker Desktop
가장 안전하게 Diffchecker를 사용하는 방법. 데스크톱 앱을 사용하면 비교 데이터가 외부로 전송되지 않습니다!
데스크톱 앱 받기
SHARE
생성일
작년
비교 결과 만료 없음
초기화
내보내기
공유
설명
51 삭제
행
총
삭제
글자
총
삭제
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
105 행
복사
21 추가
행
총
추가
글자
총
추가
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
79 행
복사
복사
복사됨
복사
복사됨
contract
TShare
is ERC20Burnable, Operator {
contract
GHOG
is ERC20Burnable, Operator {
using SafeMath for uint256;
using SafeMath for uint256;
복사
복사됨
복사
복사됨
// TOTAL MAX SUPPLY = 70,000 tSHAREs
uint256 public constant
REWARD_
POOL_ALLOCATION =
60000
ether;
uint256 public constant
FARMING_POOL_
REWARD_
ALLOCATION = 59500 ether;
uint256 public constant DEV_FUND_POOL_ALLOCATION =
10
000 ether;
uint256 public constant COMMUNITY_FUND_
POOL_ALLOCATION =
5500
ether;
uint256 public constant DEV_FUND_POOL_ALLOCATION =
5
000 ether;
복사
복사됨
복사
복사됨
uint256 public constant VESTING_DURATION =
365
days;
bool public rewardsDistributed = false;
uint256 public constant VESTING_DURATION =
370
days;
uint256 public startTime;
uint256 public startTime;
uint256 public endTime;
uint256 public endTime;
복사
복사됨
복사
복사됨
uint256 public communityFundRewardRate;
uint256 public devFundRewardRate;
uint256 public devFundRewardRate;
복사
복사됨
복사
복사됨
address public communityFund;
address public devFund;
address public devFund;
복사
복사됨
복사
복사됨
uint256 public communityFundLastClaimed;
uint256 public devFundLastClaimed;
uint256 public devFundLastClaimed;
복사
복사됨
복사
복사됨
bool public rewardPoolDistributed = false;
constructor(uint256 _startTime,
address _devFund)
ERC20("
GHOG
", "
GHOG
") {
_mint(msg.sender, 1
0
ether); // mint 1
0 GHOG
for initial pools deployment
constructor(uint256 _startTime,
address _communityFund,
address _devFund)
public
ERC20("
TSHARE
", "
TSHARE
") {
_mint(msg.sender, 1
ether); // mint 1
TOMB Share
for initial pools deployment
startTime = _startTime;
startTime = _startTime;
endTime = startTime + VESTING_DURATION;
endTime = startTime + VESTING_DURATION;
복사
복사됨
복사
복사됨
communityFundLastClaimed = startTime;
devFundLastClaimed = startTime;
devFundLastClaimed = startTime;
복사
복사됨
복사
복사됨
communityFundRewardRate = COMMUNITY_FUND_POOL_ALLOCATION.div(VESTING_DURATION);
devFundRewardRate = DEV_FUND_POOL_ALLOCATION.div(VESTING_DURATION);
devFundRewardRate = DEV_FUND_POOL_ALLOCATION.div(VESTING_DURATION);
require(_devFund != address(0), "Address cannot be 0");
require(_devFund != address(0), "Address cannot be 0");
devFund = _devFund;
devFund = _devFund;
복사
복사됨
복사
복사됨
require(_communityFund != address(0), "Address cannot be 0");
communityFund = _communityFund;
}
function setTreasuryFund(address _communityFund) external {
require(msg.sender == devFund, "!dev");
communityFund = _communityFund;
}
}
function setDevFund(address _devFund) external {
function setDevFund(address _devFund) external {
require(msg.sender == devFund, "!dev");
require(msg.sender == devFund, "!dev");
require(_devFund != address(0), "zero");
require(_devFund != address(0), "zero");
devFund = _devFund;
devFund = _devFund;
}
}
복사
복사됨
복사
복사됨
function unclaimedTreasuryFund() public view returns (uint256 _pending) {
uint256 _now = block.timestamp;
if (_now > endTime) _now = endTime;
if (communityFundLastClaimed >= _now) return 0;
_pending = _now.sub(communityFundLastClaimed).mul(communityFundRewardRate);
}
function unclaimedDevFund() public view returns (uint256 _pending) {
function unclaimedDevFund() public view returns (uint256 _pending) {
uint256 _now = block.timestamp;
uint256 _now = block.timestamp;
if (_now > endTime) _now = endTime;
if (_now > endTime) _now = endTime;
if (devFundLastClaimed >= _now) return 0;
if (devFundLastClaimed >= _now) return 0;
_pending = _now.sub(devFundLastClaimed).mul(devFundRewardRate);
_pending = _now.sub(devFundLastClaimed).mul(devFundRewardRate);
}
}
/**
/**
* @dev Claim pending rewards to community and dev fund
* @dev Claim pending rewards to community and dev fund
*/
*/
function claimRewards() external {
function claimRewards() external {
복사
복사됨
복사
복사됨
uint256 _pending =
unclaimedTreasuryFund();
uint256 _pending =
unclaimedDevFund();
if (_pending > 0 && communityFund != address(0)) {
_mint(communityFund, _pending);
communityFundLastClaimed = block.timestamp;
}
_pending =
unclaimedDevFund();
if (_pending > 0 && devFund != address(0)) {
if (_pending > 0 && devFund != address(0)) {
_mint(devFund, _pending);
_mint(devFund, _pending);
devFundLastClaimed = block.timestamp;
devFundLastClaimed = block.timestamp;
}
}
}
}
/**
/**
* @notice distribute to reward pool (only once)
* @notice distribute to reward pool (only once)
*/
*/
복사
복사됨
복사
복사됨
function distributeReward(
address _
farmingIncentiveFund
) external onlyOperator {
function distributeReward(
require(
!rewardPoolDistributed
, "only can distribute once");
address _
rewardPool
require(_farmingIncentiveFund != address(0), "!_farmingIncentiveFund");
) external onlyOperator {
reward
Pool
Distributed = true;
require(
_rewardPool != address(0), "!_rewardPool");
_mint(_
farmingIncentiveFund, FARMING_POOL_
REWARD_
ALLOCATION);
require(!rewardsDistributed
, "only can distribute once");
reward
s
Distributed = true;
_mint(_
rewardPool,
REWARD_
POOL_
ALLOCATION);
}
}
function burn(uint256 amount) public override {
function burn(uint256 amount) public override {
super.burn(amount);
super.burn(amount);
}
}
function governanceRecoverUnsupported(
function governanceRecoverUnsupported(
IERC20 _token,
IERC20 _token,
uint256 _amount,
uint256 _amount,
address _to
address _to
) external onlyOperator {
) external onlyOperator {
_token.transfer(_to, _amount);
_token.transfer(_to, _amount);
}
}
}
}
복사
복사됨
복사
복사됨
저장된 비교 결과
원본
파일 열기
contract TShare is ERC20Burnable, Operator { using SafeMath for uint256; // TOTAL MAX SUPPLY = 70,000 tSHAREs uint256 public constant FARMING_POOL_REWARD_ALLOCATION = 59500 ether; uint256 public constant COMMUNITY_FUND_POOL_ALLOCATION = 5500 ether; uint256 public constant DEV_FUND_POOL_ALLOCATION = 5000 ether; uint256 public constant VESTING_DURATION = 365 days; uint256 public startTime; uint256 public endTime; uint256 public communityFundRewardRate; uint256 public devFundRewardRate; address public communityFund; address public devFund; uint256 public communityFundLastClaimed; uint256 public devFundLastClaimed; bool public rewardPoolDistributed = false; constructor(uint256 _startTime, address _communityFund, address _devFund) public ERC20("TSHARE", "TSHARE") { _mint(msg.sender, 1 ether); // mint 1 TOMB Share for initial pools deployment startTime = _startTime; endTime = startTime + VESTING_DURATION; communityFundLastClaimed = startTime; devFundLastClaimed = startTime; communityFundRewardRate = COMMUNITY_FUND_POOL_ALLOCATION.div(VESTING_DURATION); devFundRewardRate = DEV_FUND_POOL_ALLOCATION.div(VESTING_DURATION); require(_devFund != address(0), "Address cannot be 0"); devFund = _devFund; require(_communityFund != address(0), "Address cannot be 0"); communityFund = _communityFund; } function setTreasuryFund(address _communityFund) external { require(msg.sender == devFund, "!dev"); communityFund = _communityFund; } function setDevFund(address _devFund) external { require(msg.sender == devFund, "!dev"); require(_devFund != address(0), "zero"); devFund = _devFund; } function unclaimedTreasuryFund() public view returns (uint256 _pending) { uint256 _now = block.timestamp; if (_now > endTime) _now = endTime; if (communityFundLastClaimed >= _now) return 0; _pending = _now.sub(communityFundLastClaimed).mul(communityFundRewardRate); } function unclaimedDevFund() public view returns (uint256 _pending) { uint256 _now = block.timestamp; if (_now > endTime) _now = endTime; if (devFundLastClaimed >= _now) return 0; _pending = _now.sub(devFundLastClaimed).mul(devFundRewardRate); } /** * @dev Claim pending rewards to community and dev fund */ function claimRewards() external { uint256 _pending = unclaimedTreasuryFund(); if (_pending > 0 && communityFund != address(0)) { _mint(communityFund, _pending); communityFundLastClaimed = block.timestamp; } _pending = unclaimedDevFund(); if (_pending > 0 && devFund != address(0)) { _mint(devFund, _pending); devFundLastClaimed = block.timestamp; } } /** * @notice distribute to reward pool (only once) */ function distributeReward(address _farmingIncentiveFund) external onlyOperator { require(!rewardPoolDistributed, "only can distribute once"); require(_farmingIncentiveFund != address(0), "!_farmingIncentiveFund"); rewardPoolDistributed = true; _mint(_farmingIncentiveFund, FARMING_POOL_REWARD_ALLOCATION); } function burn(uint256 amount) public override { super.burn(amount); } function governanceRecoverUnsupported( IERC20 _token, uint256 _amount, address _to ) external onlyOperator { _token.transfer(_to, _amount); } }
수정본
파일 열기
contract GHOG is ERC20Burnable, Operator { using SafeMath for uint256; uint256 public constant REWARD_POOL_ALLOCATION = 60000 ether; uint256 public constant DEV_FUND_POOL_ALLOCATION = 10000 ether; bool public rewardsDistributed = false; uint256 public constant VESTING_DURATION = 370 days; uint256 public startTime; uint256 public endTime; uint256 public devFundRewardRate; address public devFund; uint256 public devFundLastClaimed; constructor(uint256 _startTime, address _devFund) ERC20("GHOG", "GHOG") { _mint(msg.sender, 10 ether); // mint 10 GHOG for initial pools deployment startTime = _startTime; endTime = startTime + VESTING_DURATION; devFundLastClaimed = startTime; devFundRewardRate = DEV_FUND_POOL_ALLOCATION.div(VESTING_DURATION); require(_devFund != address(0), "Address cannot be 0"); devFund = _devFund; } function setDevFund(address _devFund) external { require(msg.sender == devFund, "!dev"); require(_devFund != address(0), "zero"); devFund = _devFund; } function unclaimedDevFund() public view returns (uint256 _pending) { uint256 _now = block.timestamp; if (_now > endTime) _now = endTime; if (devFundLastClaimed >= _now) return 0; _pending = _now.sub(devFundLastClaimed).mul(devFundRewardRate); } /** * @dev Claim pending rewards to community and dev fund */ function claimRewards() external { uint256 _pending = unclaimedDevFund(); if (_pending > 0 && devFund != address(0)) { _mint(devFund, _pending); devFundLastClaimed = block.timestamp; } } /** * @notice distribute to reward pool (only once) */ function distributeReward( address _rewardPool ) external onlyOperator { require(_rewardPool != address(0), "!_rewardPool"); require(!rewardsDistributed, "only can distribute once"); rewardsDistributed = true; _mint(_rewardPool, REWARD_POOL_ALLOCATION); } function burn(uint256 amount) public override { super.burn(amount); } function governanceRecoverUnsupported( IERC20 _token, uint256 _amount, address _to ) external onlyOperator { _token.transfer(_to, _amount); } }
비교하기