Skip to content

Commit

Permalink
Merge pull request #45 from Ayush272002/uint256-64
Browse files Browse the repository at this point in the history
Make capcaity, ticketPrice and ticketsSold uint64
  • Loading branch information
Ayush272002 authored Oct 27, 2024
2 parents ab5292b + a08da12 commit 7269ccd
Show file tree
Hide file tree
Showing 2 changed files with 527 additions and 527 deletions.
8 changes: 4 additions & 4 deletions contracts/EventManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ contract EventManager {
string name;
string description;
string location;
uint256 capacity;
uint256 ticketsSold;
uint256 ticketPrice; // in USD cents
uint64 capacity;
uint64 ticketsSold;
uint64 ticketPrice; // in USD cents
uint256 eventStartDate;
uint256 eventEndDate;
string[] images; // array of image URLs
Expand Down Expand Up @@ -92,7 +92,7 @@ contract EventManager {
return centsToFlare(events[_eventId].ticketPrice);
}

function createEvent(string memory _name, string memory _description, string memory _location, uint256 _capacity, uint256 _ticketPrice, uint256 _eventStartDate, uint256 _eventEndDate, string[] memory _images) public returns (uint256 _eventId) {
function createEvent(string memory _name, string memory _description, string memory _location, uint64 _capacity, uint64 _ticketPrice, uint256 _eventStartDate, uint256 _eventEndDate, string[] memory _images) public returns (uint256 _eventId) {
events[eventCounter] = Event(_name, _description, _location, _capacity, 0, _ticketPrice, _eventStartDate, _eventEndDate, _images, new uint256[](0), payable(msg.sender));
eventCounter++;
emit EventCreated(eventCounter - 1, _name, _eventStartDate);
Expand Down
Loading

0 comments on commit 7269ccd

Please sign in to comment.