Skip to content

Instantly share code, notes, and snippets.

View hementewodros's full-sized avatar

Hemen Tewodros hementewodros

View GitHub Profile
@hementewodros
hementewodros / .deps...npm....resolution-index.json
Created May 1, 2026 20:53
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.34+commit.80d5c536.js&optimize=undefined&runs=200&gist=
{
"vote.sol": {
"__sources__": {
"vote.sol": {
"content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.0;\r\n\r\ncontract Voting {\r\n uint public support;\r\n uint public oppose;\r\n\r\n mapping(address => bool) public hasVoted;\r\n\r\n event VoteCast(address voter, string voteType);\r\n\r\n function voteSupport() public {\r\n require(!hasVoted[msg.sender], \"Already voted\");\r\n support++;\r\n hasVoted[msg.sender] = true;\r\n emit VoteCast(msg.sender, \"SUPPORT\");\r\n }\r\n\r\n function voteOppose() public {\r\n require(!hasVoted[msg.sender], \"Already voted\");\r\n oppose++;\r\n hasVoted[msg.sender] = true;\r\n emit VoteCast(msg.sender, \"OPPOSE\");\r\n }\r\n\r\n function getResults() public view returns (uint, uint) {\r\n return (support, oppose);\r\n }\r\n}",
"file": "vote.sol"
}
}
},
"Voting.sol": {