I have some questions regarding NFT and hope someone can clarify it for me:
Here are what I have done so far: I've successfully run through the whole process of
Uploading an image to IPFS,
Deployed a ERC1155 contract in remix,
Mint an NFT and
Successfully showed it in opensea.io
Here are my questions:
What does it truly mean by "Minting an NFT"? As far as I know, does it mean I create a token (NFT) that represents that uploaded image?
What is the role of "Minting an NFT"?
What are the differences between "Minting an NFT using smart contract" vs "Uploading an image to opensea.io and sell it"?
It seems to me that they are the same. When I mint an NFT using smart contract, opensea.io will create a new collection for me with that contract, and the result is the same when I create a collection manually and upload an image to sell.
When I create an image and upload to IPFS, I also tried manually creating a metadata.json file to describe that file and upload it to my Google drive, which is accessible via URL.
Then when I run the smart contract, I use that meta file link as a parameter to mint an NFT.
My question is: the whole process actually did not mention "opensea.io", why opensea.io knows that I am running a smart contract and create a collection for me? '
Hope someone can help clarify that for me.
Thank you very much in advance for all your help.
What does it truly mean by "Minting an NFT"? As far as I know, does it mean I create a token (NFT) that represents that uploaded image?
Correct. Minting a token is a term used for creating the token.
What are the differences between "Minting an NFT using smart contract" vs "Uploading an image to opensea.io and sell it"?
When you upload an image to OpenSea a create a new sell order, they can currently do one of two things depending on the options you chose:
Mint a token in their own collection contract right away
OR
Mint a token in their own collection contract when the sale is successful
why opensea.io knows that I am running a smart contract and create a collection for me?
They are listening to Transfer() events on collection addresses registered in their system. Or query the historic events when you add the address later.
When the event is emitted, they can create a record in their own database pointing to your token in your collection contract, effectively creating an OpenSea collection page (not a collection contract) and filling it with your token details.
Related
I am planning to issue erc20 token on ethereum and I want to use it as a payment for dapps on polygon.
How may I estublish the interaction between the contracts? A potential answer to that question might be bridging. But I tried to look for every platform to understand, how can I use my coin tokens after bridging, but failed to find any definite answer.
so my question is, if two contracts are on the same chain-
IERC20 token = IERC20(some_address);
We use the above line to call our coin token from our dapp. Since, our coin token is on different ethereum chain, after bridging, how do we call it feom a contract that will be deployed on polygon?
Will the above line of code work? Will I get a new address on polygon for my token contract?
(Recently I have seen a technique, but couldn't understand the underlying mechanism. So, there is a website called Coinvise, they let you deploy your coin airdrop contract on polygon and let you set the nft address (to know if user holds that particular nft) as eligibility condition that is deployed on ethereum. They do it on chain using something called 'sub-graph'. I do not know what this is but I'd like to know if it helps in my case.)
I am new to blockchain, please help
I try to fetch the owner address of a NFT which sits in the Polygon Network from OpenSea.io! The problem is that the API from opensea does not support Polygon.
I use the owner address as part of a auth process with MetaMask but I cant figure out any way to get the address except with some type of website scraping tool which would be pretty quick and dirty.
Does anyone has an idea how could I get the owner address somehow from polygon?
Here a test NFT from opensea: https://opensea.io/assets/matic/0x2953399124f0cbb46d2cbacd8a89cf0599974963/25867163425986018856889440957896213450322282376135695915897716851719840727041
Contract is: 0x2953399124f0cbb46d2cbacd8a89cf0599974963
Token ID: 25867163425986018856889440957896213450322282376135695915897716851719840727041
Thx for any tips and ideas in advance
You can use the moralis sdk for this, checkout this doc -> https://deep-index.moralis.io/api-docs/#/token/getTokenIdOwners
You can get the API key by signing up on moralis and just try it out in the browser on the above link!
Can NFT's be used as a mean of authentication? The scenario is a user buys an NFT (ERC721) now he visits the site that uses this Token for authentication, so am guessing the web3.js on the site checks the users wallet if he has the token in wallet then can access the site....but what about server side calls...the server can check the ledger to see who owns the token, but how can it know if the person making the call is the owner..address can be spoofed so sending it with call is out of question. Also the case if users sells his token now a new user owns it
Am thinking something like digital signature but how to get the owners public key and is requiring users to sign messages a hassle...am noob to solidity what do I know but SO requires me to try to answer my question before asking for an answer also some code a requirement for every posts
pragma solidity ^0.4.22;contract helloWorld {
function renderHelloWorld () public pure returns (string) {
return 'helloWorld';
}
}
Checking that the viewer has an address that owns the token is not enough. You would need to confirm that the viewer controls the address by asking them to sign a message.
One system like this is called MetaKey.
If you want to coordinate sessions with a backend, you need to do additional work because the NFT could be transferred. You would need to revoke the session key when the NFT is transferred, which requires that you monitor the blockchain for transfer events.
I don't recommend building sign in infrastructure around an NFTs though. It will be extremely difficult or impossible to avoid security flaws. Better to authenticate people using a wallet signature. There are many tutorials online for building this flow, for example here.
Most NFT code are more or like similar, so every time I want to create a new type/genre for an NFT I would have to upload a new Contract? Can't I just create just one contract with a property like edition/series/season/etc.. to manage every foreseen type is that possible or will it interfere with markets/rules or something.? Any Ideas how to manage a thing like that?
Thanks
You can handle this with the ERC1155 multi token standard, it is one contract that can manage both fungible and non fungible tokens in one single deploy
How to recreate problem:
Go to this build...
https://gateway.pinata.cloud/ipfs/QmYv2TAkFNcDGG5jj9TT4G2qpVubgVP2NgHNoqn2wB71CR/build/#/swap
*DO NOT USE THIS IN MAINNET-ONLY RINKEBY
Click on the "pool" tab on the navbar after connecting your web3 enabled wallet such as metamask (make sure that your network is set to rinkeby, I only deployed contracts to that testnet!), and create a pool by clicking on "add liquidity" or "create".
The interface should let you go through with the transaction so make sure you have some test ETH on hand. The contracts created from that transaction will produce "Sushi LP Tokens"(Again not real ones, that just what I set the name to be so that it would be easily recognized.)I made sure to replace all of the contract addresses precompiled in the frontend interface with my own contracts that are listed below, even the uniswap/sdk mods.
The problem that I am having specifically is that the pool doesn't show up on the list of pairs in the modal as it usually does if you have used uniswap before. The strange thing is that it will show pools that I created on the live uniswap site using the rinkeby network.
I even created an init code hash just as instructed in this tutorial:https://blockchain.news/wiki/how-to-build-an-uniswap-exchange
I apologize in advance if this is not the correct way, place, or time to ask for help, but here I am, I am willing to work with anyone that knows how to set this up correctly.
Github:https://github.com/DarriusAlexander/uniswap-interface
My reputation is not very high so please refer to this reddit post that I created to get the contract address and metadata links.
https://www.reddit.com/r/ethdev/comments/n0hegy/please_helpi_forked_uniswap_for_a_personal/