Coder Social home page Coder Social logo

eventorganisation's Introduction

Event Contract

This is a Solidity contract that allows users to create events, buy tickets, and transfer tickets to other addresses.

Contract Details

The contract contains the following main features:

  • Event Creation: Users can create events by providing the event name, date, ticket price, and the number of available tickets.

  • Ticket Purchase: Users can buy tickets for a specific event by providing the event ID and the desired quantity of tickets. The payment should be made in Ether, and the contract ensures that the event is not expired and enough tickets are available.

  • Ticket Transfer: Users can transfer their purchased tickets to other addresses. The contract verifies the ownership of the tickets and the availability of the requested quantity before performing the transfer.

Getting Started

To use this contract, you need to have the following:

  • A compatible Ethereum wallet (e.g., MetaMask) to interact with the contract on the Ethereum network.
  • Sufficient Ether balance to purchase tickets.

Usage

  1. Deploy the Contract: Deploy the EventContract.sol Solidity contract on an Ethereum network of your choice (e.g., Ethereum Mainnet, Rinkeby, etc.).

  2. Interact with the Contract: Once the contract is deployed, you can interact with it using an Ethereum wallet application, such as MetaMask. Connect your wallet to the deployed contract address.

  3. Create an Event: Use the createEvent function to create an event. Provide the event name, date, ticket price, and the number of available tickets. Make sure the event date is in the future.

  4. Buy Tickets: Use the buyTicket function to purchase tickets for a specific event. Provide the event ID and the quantity of tickets you want to purchase. Make sure to send the correct amount of Ether with the transaction.

  5. Transfer Tickets: Use the transferTicket function to transfer your purchased tickets to another address. Provide the event ID, the quantity of tickets to transfer, and the recipient's address. Ensure you have enough tickets to transfer.

eventorganisation's People

Contributors

prateeksavanur avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.