Skip to content

Commit

Permalink
update ether to trx
Browse files Browse the repository at this point in the history
  • Loading branch information
gao623 committed Oct 24, 2022
1 parent 0b4d374 commit b1a76ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions contracts/lib/PosLib.sol
Expand Up @@ -83,12 +83,12 @@ library PosLib {


// function getMinIncentive1 () public view returns(uint256,uint256) {
// return (getMinIncentive(100000 ether,now - 86400 * 4),0);
// return (getMinIncentive(100000 trx,now - 86400 * 4),0);
// }


// function getMinIncentive2 () public view returns(uint256,uint256) {
// return (getMinIncentive(10000000 ether,now - 86400 * 4),0);
// return (getMinIncentive(10000000 trx,now - 86400 * 4),0);
// }

function getMinIncentive (uint256 smgDeposit,uint256 day, uint256 totalDeposit) public view returns(uint256) {
Expand All @@ -107,7 +107,7 @@ library PosLib {
return 0;
}

uint256 hardcapReturn = hardcap.mul(1 ether).div(DIVISOR).mul(smgDeposit).div(totalDeposit);
uint256 hardcapReturn = hardcap.mul(1 trx).div(DIVISOR).mul(smgDeposit).div(totalDeposit);

return hardcapReturn<=p1Return?hardcapReturn:p1Return;
}
Expand Down
16 changes: 8 additions & 8 deletions contracts/test/TestQuotaHelper.sol
Expand Up @@ -48,19 +48,19 @@ contract TestQuotaHelper {
)
{
if (storemanGroupId == keccak256("storeman1")) {
deposit = 1000 ether;
deposit = 1000 trx;
}

if (storemanGroupId == keccak256("storeman2")) {
deposit = 1000 ether;
deposit = 1000 trx;
}

if (storemanGroupId == keccak256("storeman3")) {
deposit = 1000 ether;
deposit = 1000 trx;
}

if (storemanGroupId == keccak256("storeman4")) {
deposit = 1000 ether;
deposit = 1000 trx;
}
}

Expand All @@ -70,19 +70,19 @@ contract TestQuotaHelper {
returns (uint256 deposit)
{
if (storemanGroupId == keccak256("storeman1")) {
return 1000 ether;
return 1000 trx;
}

if (storemanGroupId == keccak256("storeman2")) {
return 1000 ether;
return 1000 trx;
}

if (storemanGroupId == keccak256("storeman3")) {
return 1000 ether;
return 1000 trx;
}

if (storemanGroupId == keccak256("storeman4")) {
return 100 ether;
return 100 trx;
}

return 0;
Expand Down

0 comments on commit b1a76ea

Please sign in to comment.