New answers tagged

1

I looked at Cryptopunks contract and I don't see any royalty going to Larva Labs. Is it normal to add a comission back to me for my generative art project? Yes I noticed some projects take a set price when going live with minting but is that all they take? Without you naming "some projects" and giving specifics links, any answer would be pure ...


0

WETH or WBTC are wrapped Ethereum and wrapped Bitcoin... the idea is that ERC20 is the Gold Standard that all (fungible) tokens are judged against. Yes, there are newer standards (ERC777 looks like the main, more complete contender), but they all strive for backwards compatibility. So once you get a wallet that understands ERC20, it'll work with WETH, WBTC, ...


0

mhhh, not too sure, and not really familiar with OpenSea anyways. Do you have a way to check the token contract address? because anyone can create an ERC20 token and call it WETH. Maybe the guy is just trying to scam you by sending you worthless tokens.


0

There are quite a few caveats to Upgradable Smart contracts and various approaches. In the case of the proxy method you are referring to the Proxy Smart contract interacts with a Logic Smart contract. The contract state is stored in the Proxy Contract and Logic is executed via the Logic contract. When Upgrades are performed it is referring to creating a ...


0

I understand that you are looking to have a contract-enforced way to specify that the metadata will include a certain name. Of course you will not achieve this goal if the contract allows arbitrary URLs linking to arbitrary JSON which can have any name set. Here are some options. Give up. Do not put the name in the ERC721Metadata, instead, create a ...


0

See: https://eips.ethereum.org/EIPS/eip-721#simple-summary /// @title ERC-721 Non-Fungible Token Standard, optional metadata extension /// @dev See https://eips.ethereum.org/EIPS/eip-721 /// Note: the ERC-165 identifier for this interface is 0x5b5e139f. interface ERC721Metadata /* is ERC721 */ { /// @notice A descriptive name for a collection of NFTs in ...


2

It depends on how you implement your NFT. In the standard OpenZeppelin implementation, there is no possibility to directly modify the tokenUri. There's only a getter: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/566a774222707e424896c0c390a84dc3c13bdcb2/contracts/token/ERC721/ERC721.sol#L92 If you think about it, it makes a lot of sense to not ...


1

Is it just another property of the one NFT that references another NFT ? Yes it probably is, i don't see any complex solution for this. When a gotchi with wearables is sold, do all the NFTs involved have to be updated to change ownership? if the wearables are independent NFTs then yes they will have to change too. by this definition the price of a gotchis ...


1

No they are not ERC20. Also, they are not ERC20 compatible. They have similar functionalities, but a bit different - plus some extra stuff. It's actually a bit tricky to find a full flat implementation of ERC721, since it's always used in a modular way: various contracts (and interfaces) are inherited which combined make the full functionality. The most ...


0

As William was saying, there is no easy way to do this. You would have to build up your own database and scan through the blockchain for the mint events in ERC721 and ERC1155 contracts. We stumbled upon this problem ourselves and we built a solution that you can use if you want. It doesn't quite get you the entire way, it will allow you to get all the NFTs ...


0

You can do it without Solidity. I'll assume you need server-side confirmation. You will need the token contract address and token id. From these, you can get the owner address with a Web3 Javascript API call. The server will need an Ethereum node or API such as Infura to process the request and get the address return value. Using truffle contracts and after ...


0

I use this contract: // SPDX-License-Identifier: MIT pragma solidity >=0.4.21 <0.9.0; import '@openzeppelin-contracts/contracts/token/ERC721/ERC721.sol'; import '@openzeppelin-contracts/contracts/finance/PaymentSplitter.sol'; contract BALANCE is ERC721 { event NftBought(address _seller, address _buyer, uint256 _price); mapping (uint256 => ...


1

I do it with infura node so I have a socket with this node to keep tracks of events. If you don't want a socket maybe you can run your node locally and your database will make call() to your own node ?


0

In order to get all NFTs of a user, you need to have an indexed database where you save this data. Then you index all transfer events of ERC721 contracts and eventually calculate the balances for every address and saves this into a database where it's quickly accessible for every request. The transfer events to index for ERC721 is the following: Transfer(...


0

Asset tokenization uses the blockchain as a trusted third party that will faithfully keep the asset data intact, including the asset's ownership. So if you can convert an object, like your car, to a token via signing (complex hashing workflow) the object's identifier (papers or certificate of ownership) with your private key and another third-party's key you ...


0

tl;dr: instead of using contract.functions.setURI(...).call(), use contract.functions.setURI.transact() There's a big difference between how web3 libraries call a read-only function and how they call a state-changing function. For the former, no value needs to be sent, nothing needs to be signed with a private key. When state is being changed, though, a ...


1

From the purchase function _price is the price of each token in wei. function purchase(uint numberOfTokens) public payable { require(numberOfTokens <= 50, "Can only purchase a maximum of 50"); require(_price.mul(numberOfTokens) <= msg.value, "Ether value sent is not correct"); mintToSender(numberOfTokens); } If you want ...


2

It depends on how you code the NFT. But basically you'd have a function that updates the on-chain metadata and/or updates the tokenURI to reflect the changes, and you'd make it in such a way that only the token owner can call the function. Yes, they would need to know solidity. If you added a function to the NFT contract like: function changeAttributes(...


3

To my knowledge, none of the marketplaces have this functionality of the owner being able to edit the metadata. But with that being said, there is nothing stopping you from including this functionality in your token contract. But it also depends on what you mean with metadata. Usually, with metadata, we are referring to the name and symbol of the NFT. That's ...


0

create brownie-config.yaml in root of your project or your home folder The configuration file must be saved as brownie-config.yaml. If saved in >the root directory of a project it will be loaded whenever that project is >active. If saved in your home path, it will always be loaded. use the brownie docs to get the default config file and paste it into ...


Top 50 recent answers are included