Hot answers tagged

4

I was also struggling with this previously. This error occurs with users using Metamask with Ledger/Trezor. It appears that more recent versions of web3js is requiring Metamask to strictly send txs as EIP1559 txs, although Ledger does not support EIP1559 txs with Metamask just yet. Metamask have rolled out EIP1559 + Ledger support on version 10.1.0 (https://...


2

So basically i accidentally created the brownie-yaml.config file outside of the project folder. some-folder | -project-folder | | -src | | -contracts | | -... brownie-config.yaml once I move the .yaml file into the project folder it all works fine


1

The string size is limited only by the size of strings returnable from transactions. Because of the Yellow Paper, you will need to store those values in memory before returning, you are limited only by the memory-expansion function. If you want the strings to be meaningful, the limit is much less. The contract can change URLs. Other contracts can query ...


1

Answers: The size limit is only the transaction/block size limit. Based on calculations (https://ethereum.stackexchange.com/a/1110/31933) you can fit "780kB (about 3 million gas)" in a block. Nowadays gas limit is about 15 million, so 5 * 780kB = about 4 MB. So you can have a url of about 4 MB - that's a lot of characters. It can only be changed ...


1

Blacklisting is possible simply if the contract has such functionality. Since the contract handles token transfers, a token can also include functionality which restricts transfers, according to some logic. In theory, since the contract also has the ledger of ownerships, if the contract has such functionality, your NFT could even be removed. But I've never ...


1

You cannot iterate a mapping. Your two choices are to: Implement ERC721Enumerable which is designed to make this specific use case as simple as possible. Do not implement ERC721Enumerable and use an archival node to listen to all Transfer events to catalog the tokens.


1

Based on diagram above, sending the JSON data from client to backend is duplicative. That information is already public and well-known (it's published on the blockchain). Instead, the request from client to backend should simply be like "tell me about token 15". And the server should know everything everything about token 15 at that time.


1

npm install @openzeppelin/contracts I re-installed open zeppelin contracts and that worked.


1

This is basically an eth_getTransactionReceipt response, but you are not going to retrieve the return value using this unless your function has the view/pure modifier, in your case this function needs to modify the state of the contract so you need to create an Event to log it when the function is done, then you will be able to check it, something like: // ...


1

You touch more than one topic. web3 and solidity. You could transfer tokens using IERC20 interface of a ERC20 token in your smart contract. safeTransferFrom is in ERC721, to send tokenid (nft) to another contract. eg. https://docs.openzeppelin.com/contracts/2.x/api/token/erc721#ERC721-safeTransferFrom-address-address-uint256- Good start and I recommend you ...


Only top voted, non community-wiki answers of a minimum length are eligible