ERC721 function that able to have "View NFT" in etherscan? - etherscan

recently i notice there are function in etherscan can view NFT . May i know what are the requirements during draft ERC721 contract? which function are require in order to achieve this?
https://etherscan.io/token/0xdE1666ebe8c953B358F47Bf301Db2161E38f8EDC

Related

Solidity openzeppelin public mint ERC721 token function, is any arguments really neccessary? [duplicate]

I'm trying to build an NFT marketplace. So I wanted to create an ERC1155 smart contract to allow content creators to put their art into the smart contract. I'm using OpenZeppelins wizard as a base but I found some weirdness on the mint function. It's allowing only the owner of the contract to mint:
It's made me suspicious about my actions. Should I disallow users to mint to create items on my contract?
I can't speak for the wizard authors why they decided on some specific approach.
However it's an established practice that when an artist or any other authorized person publishes an NFT collection, they don't want other people to contribute to this specific collection and change the overall meaning of it. For example, if you have a collection of NFTs representing pictures of dogs, you might not want other people to create NFTs representing pictures of cats in the same collection. Or any other unrelated pictures for that matter.
If you want to allow minting tokens in the collection by anyone, you can remove the onlyOwner modifier from the mint functions As well as the Ownable extension of MyTokens contract and its import, assuming you don't use the Ownable features elsewhere in your contract.

adding credit card option function in smart contract for minting NFT

I'm looking into adding a function to allow payments by cc during mint. Has anyone done this successfully and is willing to share how you went about it? Thanks!
The only way for doing this is after user paying you need to make the minting from your server and transfer it to the user or mint it directly to the user wallet

About Solidity Transferfrom and Approve Functions

I actually need a very simple smart contract using the following functions "transferfrom" and "approve".
I just need a smart contract that will be able to request approval to spend a token ( example -- bake ) from a wallet if the user calls the "approve" function.
It will also be able to withdraw the particular token from the user's wallet to the "address to" set by the contract's onwer, if the onwer calls the "transferfrom" function.
There's a design limitation of the ERC20 standard that disallows approval through a contract in between.
The user always needs to invoke the approve() function on the token contract directly - not through your contract.

how to buy/sell bsc tokens on pancakeswap from a solidity smart contract?

I just start to learn solidity and I've finished a couple courses and I want some help to create my first working smart contract.
The smart contract I want to build will buy and sell tokens on the pancakeswap platform from a smart contract; it like my smart contract will start interacting with a pancakeswap contract to execute some trades, doing the same stuff as I'm using their website.
Any help will be appreciated
I have tried to add the interfaces I need to start the interaction between my contract and pancakeswap router contract to use the function

how to differentiate between buyer and seller in smart contract?

I'm creating a new token in BSC using Solidity, and I want to identified when someone is buying, so I can make the contract do something specific
How can I identified when someone is BUYING? thanks