Cleanup after merge

This commit is contained in:
Theo 2023-05-27 18:56:29 +03:00
parent 9525b3dae4
commit 77b361d8a5
4 changed files with 13 additions and 7 deletions

View File

@ -5,7 +5,6 @@ pragma experimental ABIEncoderV2;
import { Test } from "@forge-std/Test.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { ERC20Permit } from "torn-token/contracts/ERC20Permit.sol";
import { console2 } from "@forge-std/console2.sol";
import { Mock } from "./Mock.sol";
import { Proposal, IGovernance } from "@interfaces/IGovernance.sol";
@ -57,13 +56,15 @@ contract ProposalUtils is Mock, Parameters, Test {
uint256 lockTimestamp = block.timestamp + PROPOSAL_DURATION;
uint256 accountNonce = ERC20Permit(_tokenAddress).nonces(voter);
console2.log("Account nonce: %s", accountNonce);
bytes32 messageHash = keccak256(
abi.encodePacked(
PERMIT_FUNC_SELECTOR,
EIP712_DOMAIN,
keccak256(abi.encode(PERMIT_TYPEHASH, voter, _governanceAddress, amount, accountNonce, lockTimestamp))
keccak256(
abi.encode(
PERMIT_TYPEHASH, voter, _governanceAddress, amount, accountNonce, lockTimestamp
)
)
)
);

View File

@ -32,7 +32,7 @@ contract TestContractsState is MockProposal {
accumulatedRewardsBeforeExecution / 10 ** 18
);
console2.log(
"Bugged value of accumulated rewards per TORN: %s", oldStaking.accumulatedRewardPerTorn()
"Bugged value of accumulated rewards per TORN: %s\n", oldStaking.accumulatedRewardPerTorn()
);
createAndExecuteProposal();

View File

@ -75,7 +75,9 @@ contract TestGovernanceStakingRewards is MockProposal {
burnTokens(_governanceAddress, toBurn, staking);
uint256 stakerRewardsAfterBurning = staking.checkReward(TEST_ADDRESS_ONE);
console2.log("Staking rewards after burning 10 000 TORN: %s TORN", stakerRewardsAfterBurning / 10e17);
console2.log(
"Staking rewards after burning 10 000 TORN: %s TORN\n", stakerRewardsAfterBurning / 10e17
);
require(stakerRewardsAfterBurning > stakerRewardsBeforeBurning, "Rewards isn't changed after burning");
// All TORN, locked by users in Governance, is on the userVault contract balance
@ -84,7 +86,7 @@ contract TestGovernanceStakingRewards is MockProposal {
uint256 expectedRewards = stakerLockedBalance * toBurn / governanceLockedAmount;
console2.log("Expected staking rewards: %s TORN", expectedRewards / 10e17);
console2.log("Staker received rewards: %s TORN", receivedReward / 10e17);
console2.log("Staker received rewards: %s TORN\n", receivedReward / 10e17);
require(receivedReward == expectedRewards, "Expected and received rewards don't match");

View File

@ -7,5 +7,8 @@ contract Parameters {
address constant _governanceAddress = 0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce;
address constant _governanceVaultAddress = 0x2F50508a8a3D323B91336FA3eA6ae50E55f32185;
address constant _tokenAddress = 0x77777FeDdddFfC19Ff86DB637967013e6C6A116C;
// Information about token
uint256 constant _tornMaximumSupply = 10_000_000;
uint256 constant _tornDecimals = 1e18;
}