diff --git a/contracts/TicketManager.sol b/contracts/TicketManager.sol index c3e2043..5d9369b 100644 --- a/contracts/TicketManager.sol +++ b/contracts/TicketManager.sol @@ -2,6 +2,7 @@ pragma solidity 0.8.19; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./EventManager.sol"; @@ -26,8 +27,9 @@ contract TicketManager is ERC1155, ReentrancyGuard, EventManager { constructor(string memory uri_) ERC1155(uri_) {} function getUri(uint256 eventId) external view returns(string memory) { + string memory eventID = Strings.toString(eventId); string memory baseUri = uri(eventId); - return string(abi.encodePacked(baseUri, eventId)); + return string(abi.encodePacked(baseUri, eventID)); } function purchaseTickets(uint256 eventId, uint256 numOfTickets) external payable checkId(eventId) {