update kick from queue logic and add mordor to foundry.toml

Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
Uncle Fatso 2026-02-17 13:46:44 +03:00
parent efe1f7ce25
commit 2f8aedb6e3
Signed by: f4ts0
GPG Key ID: 565F4F2860226EBB
3 changed files with 10 additions and 10 deletions

View File

@ -38,7 +38,9 @@ forge-std = { version = "1.9.2", url = "https://soldeer-revisions.s3.amazonaws.c
anvil-localnet = "http://127.0.0.1:8545"
sepolia-testnet = "${SEPOLIA_TEST_RPC_URL}"
hoodi-testnet = "${HOODI_TEST_RPC_URL}"
mordor-testnet = "${MORDOR_TEST_RPC_URL}"
[etherscan]
sepolia-testnet = { key = "${SEPOLIA_TEST_API_KEY}", url = "${SEPOLIA_TEST_ENDPOINT}" }
hoodi-testnet = { key = "${HOODI_TEST_API_KEY}", url = "${HOODI_TEST_ENDPOINT}" }
mordor-testnet = { key = "${MORDOR_TEST_API_KEY}", url = "${MORDOR_TEST_ENDPOINT}" }

View File

@ -115,19 +115,17 @@ contract GhostGovernor is
revert GovernorInsufficientProposerVotes(proposer, proposerVotes, votesThreshold);
}
if (proposerVotes <= activeProposedLock) {
revert ProposerNotEnoughVotes(proposerVotes, activeProposedLock);
}
uint256 proposalId = _lastProposalId;
if (proposalId != 0) {
bytes32 currentProposalState = _encodeStateBitmap(state(proposalId));
bytes32 terminalStatesBitmap =
_encodeStateBitmap(ProposalState.Canceled) |
_encodeStateBitmap(ProposalState.Expired) |
_encodeStateBitmap(ProposalState.Executed);
bytes32 activePendingMask =
_encodeStateBitmap(ProposalState.Pending) |
_encodeStateBitmap(ProposalState.Active);
if (currentProposalState & terminalStatesBitmap == 0) {
if (currentProposalState & activePendingMask != 0) {
if (proposerVotes <= activeProposedLock) {
revert ProposerNotEnoughVotes(proposerVotes, activeProposedLock);
}
(
address[] memory currentTargets,
uint256[] memory currentValues,

View File

@ -260,7 +260,7 @@ contract GhostGovernorTest is Test {
vm.roll(block.number + 3);
(uint256 newProposalId,,,,) = _proposeDummy(carol, 1337);
assertEq(uint8(governor.state(proposalId)), uint8(IGovernor.ProposalState.Canceled));
assertEq(uint8(governor.state(proposalId)), uint8(IGovernor.ProposalState.Succeeded));
assertEq(uint8(governor.state(newProposalId)), uint8(IGovernor.ProposalState.Pending));
assertEq(ghst.balanceOf(alice), amount);