📖
Metapass API
  • Welcome!
  • Quick Start
    • Graph Node Requests
    • Smart Contract Requests
    • Miscellaneous
  • Reference
    • Graph Node API
      • TKETSFactory
      • Event
      • Ticket
      • TicketToken
    • Smart Contract Specifications
      • EventFactory
        • ABI
      • Ticket
        • ABI
Powered by GitBook
On this page
  • Function signatures
  • Structs
  1. Reference
  2. Smart Contract Specifications

EventFactory

Function signatures

createEvent(FactoryStructs.EventMetadata calldata _metadata)

Creates an event using the metadata provided. Sets the owner of the event to msg.sender.

transferOwnership(uint160 eventId, address _newOwner)

Transfers the ownership of an event to a new address. Only callable by the owner of an event.

cancelEvent(uint160 eventId)

Cancels an event, and enables refunds. Only callable by the owner of an event.

createTicket(uint160 eventId, string calldata uri, bytes32 uriHash, bool useTokenIDInURI, uint256 _ticketPrice, FactoryStructs.TicketMetadata calldata _ticketMetadata)

Creates a ticket smart contract using the provided data. Only callable by the owner of an event.

validateTicket(uint160 eventId, address holder, Ticket ticket, uint256 ticketId, uint256 timestamp, uint8 v, bytes32 r, bytes32 s)

Validates a ticket using the provided data and signature. This is a view function that costs no gas.

isStamperAuthorized(address stamper, uint160 eventId)

Check if a stamper is authorised for an event. This is a view function that costs no gas.

addStamperToEvent(address stamper, uint160 eventId)

Adds a stamper to an event. Only callable by the owner of an event.

removeStamperFromEvent(address stamper, uint160 eventId)

Removes a stamper from an event. Only callable by the owner of an event.

Structs

library FactoryStructs {
    struct EventMetadata {
        uint256 timeStart;
        uint256 timeEnd;
    }
    
    struct TicketMetadata {
        uint256 maxTickets;
        uint256 ticketStartTime;
        uint256 ticketEndTime;
        bool acceptDonations;
        bool allowRefunds;
    }
}
PreviousSmart Contract SpecificationsNextABI

Last updated 3 years ago