/Traveloor

Primary LanguageSolidity

Traveloor

Traveloor is a platform that can make it easier for users to purchase exclusive travel and vacation access in form of NFTs. Traveloor is an ERC1155 smart contract that handles five types of ERC721 Nfts: FLIGHT tickets, CRUISE tickets, HOTEL tickets, TRAIN tickets, and PREMIUM tickets which allows access to the other four NFTs, provided users have previously purchased an NFT, and for a slightly higher cost.

Prerequisites

Please install or have installed the following:

Installation

  1. Install Hardhat, if you haven't already. Here is a simple way to install brownie.
yarn add hardhat
yarn hardhat

Or, if that doesn't work, via npm

npm add hardhat
npm hardhat
  1. Download the project and install dependencies.
git clone https://github.com/jefedcreator/Traveloor/
cd Traveloor
yarn install

Testnet Development

Before we deploy to the Ropsten network, do the following.

Set your ETHERSCAN_API_KEY, ROPSTEN_URL and PRIVATE_KEY environment variables.

You can get a ROPSTEN_URL by getting a free trial of Alchemy. If you get lost, you can follow this guide to getting a project key. You can find your PRIVATE_KEY from your ethereum wallet like metamask or you can create a temporary mnemonic to test this project Bip39 Mnemonic Code

You'll also need testnet ETH and LINK. You can get LINK and ETH into your wallet by using the faucets located here. If you're new to this, watch this video.. Look at the ropsten sections for those specific testnet faucets.

You'll also need etherscan API key in order to verify the contracts . You can get instruction guide on getting your API Kes here follow the instructions here.

You can add your environment variables to a .env file. You can use the .env.exmple as a template, just fill in the values and rename it to '.env'.

Here is what your .env should look like:

ETHERSCAN_API_KEY=<API_KEY>
ROPSTEN_URL=<ROPSTEN_URL>
PRIVATE_KEY=<PRIVATE_KEY>

WARNING WARNING WARNING

DO NOT SEND YOUR PRIVATE KEY WITH FUNDS IN IT ONTO GITHUB

Running Scripts and Deployment

Setup Contract

This will deploy the smart contract to ropsten and verify it on the block explorer.

yarn hardhat run scripts/deploy.ts --network ropsten

Thriftor simulation and Testing

This will deploy the smart contract to a loacal hardhat blockchain and run all its functions succesfully

yarn hardhat test test/traveloor.ts

License

This project is licensed under the MIT license.