```\n  function _getProposalState(uint256 proposalId) internal view returns (ProposalState) {\n    Proposal storage proposal = proposals[proposalId];\n    if (proposal.cancelled) return ProposalState.Canceled;\n    else if (block.number <= proposal.startBlock) return ProposalState.Pending;\n    else if (block.number <= proposal.endBlock) return ProposalState.Active;\n    else if (proposal.eta == 0) return ProposalState.Succeeded;\n    else if (proposal.executed) return ProposalState.Executed;\n    else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < Goldiswap(goldiswap).totalSupply() / 20) { //@audit shouldn't use totalSupply\n      return ProposalState.Defeated;\n    }\n    else if (block.timestamp >= proposal.eta + Timelock(timelock).GRACE_PERIOD()) {\n      return ProposalState.Expired;\n    }\n    else {\n      return ProposalState.Queued;\n    }\n  }\n```\n