New answers tagged

0 votes

Is it possible for a view function to revert (in a loop?)

Yes. Usually public nodes limit view functions to the block gas limit. To protect servers from denial of service attacks. You could run your own server and set a very high gas limit.
Ismael's user avatar
  • 30.5k
0 votes

Race conditions when calling remote contracts

But in this paper, there is an example of a concurrency problem and a race condition in one smart contract by calling two concurrent transactions, creating a race condition, and a kind of attack ...
Atefeh's user avatar
  • 1
-1 votes

How to check the size of a contract in Solidity?

You can get contract size in hardhat e.g. test.js in /scripts of hardhat project const hre = require("hardhat") async function test() { // Use Hardhats provider (locally) or your own ...
blockson's user avatar
0 votes
Accepted

Etherscan claimed MANA, DEXE & REQ tokens creation tx's return different contractAddresses, they got an issue or I miss something?

Apparently it's also possible to create contracts using an internal tx with a type of CREATE or CREATE2 and that's the case for the above tokens
Nimrod Yonatan Ben-Nes's user avatar
0 votes

UUPS Upgrades using Foundry

The OpenZeppelin team has developed a new library based on Foundry for working with UUPS contracts. Check it here: https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades
Gabriel Stoica's user avatar
1 vote

What's type hash's usecase in EIP-712?

EIP-712 is about "hashing and signing of typed structured data". It does provide "an extensible mechanism for domain separation" which is important for security, but the goal of ...
eth's user avatar
  • 85.5k
0 votes

gasLimit argument in ethers.js confuses me

Without seeing the contract you're calling, it's hard to tell you exactly what is causing this. However, one thing I would like to point out in your assumptions is: The state of the smart contract ...
natewelch_'s user avatar
0 votes

I need help coming up with a code solution of a change I want to make to my stable coin project

I figured it out this proposed solution work with a small modification from this: function mintDsc(uint256 amountDscToMint) public moreThanZero(amountDscToMint) nonReentrant { // Retrieve the ...
Dylan Katsch's user avatar
0 votes

How to design a smart contract that allows people to trade NFTs

Does a platform exist that supports this sort of NFT for NFT trade? I haven't heard of anything like this, but it might exist. This type of trade is called an "escrow." Use search terms like ...
Henry Gagnier's user avatar
1 vote

How to design a smart contract that allows people to trade NFTs

This is possible and you would do this with Solidity. You would use the ERC-721 functions which would require that both users approve the smart contract to transfer (via the ERC-721 approve function) ...
Jack Antico's user avatar

Top 50 recent answers are included