📖
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
  1. Reference
  2. Smart Contract Specifications

Ticket

eventId()

Gets the event ID of the smart contract

useTokenIDInURI()

Gets whether the token ID should be included in the Token ID

ticketPrice()

Gets the current ticket price in Wei

refundPrice()

Gets the current refund price in Wei

mintTicket(uint256 numberOfTickets)

Mints numberOfTickets of tickets. Requires the value of the call to match the price expected.

changeTicketPrice(uint256 _newTicketPrice)

Change the price of the ticket in Wei. Only callable by the owner of the event.

changeRefundPrice(uint256 _newRefundPrice)

Change the refund price of the ticket. Only callable by the owner of the event.

stampTicket(uint256 ticketId)

Marks a ticket as stamped. Only callable by the owner of the event, or the authorised stampers of the event.

transferFrom(address _from, address _to, uint256 tokenId)

Transfers a ticket with token ID from an address to another. Only callable by the owner of the ticket token, or the approved sender of the ticket token.

tokenURI(uint256 tokenId)

Gets the tokenURI of a token ID.

withdrawBalance()

Withdraws the balance of the smart contract to the owner's address. Only callable by the owner of the event.

refundTicket(uint256 tokenId)

Refunds a ticket for the refund price. Only callable by the owner of the ticket token, and if the event has been cancelled.

refundAll()

Refunds up to 5 tickets at once for the refund price. Only callable by the owner of the ticket token, and if the event has been cancelled.

depositBalance()

Deposits a sum of TFUEL into the smart contract address, for refund purposes. Only callable by the owner of the event.

PreviousABINextABI

Last updated 3 years ago