We are building EduLadder(ELADR) - Protocol

The Eladr Protocol is a decentralized, security and efficiency enhanced Web3 noSQL database powered by IPFS as the data storage layer https://ipfs.io/, and the Cardano block chain as the rewards token platform, https://cardano.org/. It provides a JSON based, IPFS layer 2 solution for data indexing and retrieval in an 'append only' file system built with open source Node.js API libraries.

The ELADR token was designed to incentivize and reward community members as a proof of contribution. Token holders are also granted access to EduLadder.com premium features as well as associated ELADR token enabled apps.

WHITE PAPER Buy Now

Real Problems! Real Experts!

Join Our Telegram Channel !


The Eduladder is a community of students, teachers, and programmers. We help you to solve your academic and programming questions fast.
In eduladder you can Ask,Answer,Listen,Earn and Download Questions and Question papers.
Watch related videos of your favorite subject.
Connect with students from different parts of the world.
Apply or Post Jobs, Courses ,Internships and Volunteering opportunity. For FREE
See Our team
Wondering how we keep quality?
Got unsolved questions? Ask Questions
ELADR beta version launched

We launched Anonymous immutable internet on eladr protocol

For any question or query please joinOur Telegram Channel !


Try BETA
Youtube Videohttps://www.youtube.com/watch?v=ySLPZu3Jxro

Our Github Repo
FrontEnd BackEnd

We are looking for some great and cool people to work with us. Please sent your resume to admin@eduladder.com

Global-Wireless-E-Voting-->View question

Creating an NFT token with ERC-1155 standard

Creating an NFT token with ERC-1155 standard


Asked On2022-01-23 12:49:32 by:Suresha-N

Taged users:


Likes:
Be first to like this question

Dislikes:
Be first to dislike this question
Talk about this  Like  Dislike
View all questions
Answers

The multi token support option offered by ERC-1155 is one of its prime features. Imagine a scenario where every single airline possesses a unique token. If you’re looking to book a flight with three different connecting flights from various airlines, you would need to pay for each airline ticket individually. There could be many problems associated with this. In order to overcome these issues, you can create a single multi-token contract which holds the individual tokens for every airline? That’s exactly what ERC-1155 allows you to do. Instead of just one token class, you can add as many as we want. Let us take a look at how to implement the ERC-1155 token with Openzeppelin contracts for this example. Install them with npm or directly in Remix by importing the GitHub URL.

  1. import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
  2. contract AirlineTokens is ERC1155 {
  3. address public governance;
  4. uint256 public airlineCount;
  5. modifier onlyGovernance() {
  6. require(msg.sender == governance, "only governance can call this");
  7. _;
  8. }
  9. constructor(address governance_) public ERC1155("") {
  10. governance = governance_;
  11. airlineCount = 0;
  12. }
  13. function addNewAirline(uint256 initialSupply) external onlyGovernance {
  14. airlineCount++;
  15. uint256 airlineTokenClassId = airlineCount;
  16. _mint(msg.sender, airlineTokenClassId, initialSupply, "");
  17. }
  18. }

Now all you need to do is call AirlineTokens.safeBatchTransferFrom(myBuyerAddress, sellerAddress, [airlineId1, airlineId2, airlineId3], [firstFlightPrice, secondFlightPrice, thirdFlightPrice], ‘”). After this, you can pay in each airline currency in a single transaction.


Answerd on:2022-01-23 Answerd By:Suresha-N

Likes:
Be first to like this answer

Dislikes:
Be first to dislike this answer
Talk about this  Like  Dislike

You might like this video:Watch more here

Watch more videos from this user Here

Learn how to upload a video over here



Lets together make the web is a better place

We made eduladder by keeping the ideology of building a supermarket of all the educational material available under one roof. We are doing it with the help of individual contributors like you, interns and employees. So the resources you are looking for can be easily available and accessible also with the freedom of remix reuse and reshare our content under the terms of creative commons license with attribution required close.

You can also contribute to our vision of "Helping student to pass any exams" with these.
Answer a question: You can answer the questions not yet answered in eduladder.How to answer a question
Career: Work or do your internship with us.Work with us
Create a video: You can teach anything and everything each video should be less than five minutes should cover the idea less than five min.How to upload a video on eduladder