Skip to content

Commit

Permalink
Create governance_v2.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 11, 2024
1 parent e6f0181 commit 32ebea1
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pragma solidity ^0.8.0;

import "https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/math/SafeMath.sol";

contract GovernanceV2 {
// Mapping of proposals
mapping (uint256 => Proposal) public proposals;

// Function to create a new proposal
function createProposal(string memory description, address[] memory targets, uint256[] memory values) public {
// Create a new proposal
Proposal proposal = Proposal(description, targets, values);
proposals[proposalId] = proposal;
// Emit event to notify voters
emit NewProposal(proposalId);
}
}

0 comments on commit 32ebea1

Please sign in to comment.