Questions tagged [evm]

For questions about the Ethereum Virtual Machine programming language, the programming language of smart contracts on the Ethereum blockchain.

173 questions
0
votes
1 answer

Gas estimation errored with the following message (see below). The transaction execution will likely fail REMIX - Multisignature

I have this contract that when I try to deploy it with Fuji it sends me the gasLimit error and when I do it from Remix it returns the error description Gas estimation errored with the following message (see below). The transaction execution will…
0
votes
1 answer

How to ".call" a function of another contract which uses ".call"

So, I'm learning advanced smart contract development. Two days ago, I learned about Reentrancy attacks and then I also created two contracts Protocol.sol (vulnerable contract) + Hacker.sol (attacker contract) to put my knowledge to the test. I was…
DevABDee
  • 180
  • 9
0
votes
1 answer

Is it possible to transfer money without Internal TXNs?

Exactly what I want is this: I'm transferring money to a contract. The money coming into this contract will be forwarded to the destination address without creating any TXN (that is, anonymously). I created a contract and the money sent to this…
hertac
  • 9
  • 2
0
votes
0 answers

Solidity Chainlink keepers

I'm integrating a code where a ChainLink pricefeed is called inside a checkUpkeep() function transferring data to a performUpkeep(). The code checks if a Stop Loss price previously registered and refered to a wallet is reached and then calls the…
Oriok
  • 63
  • 7
0
votes
1 answer

What are the tradeoffs associated with the initialization syntax of the maximum value of an integer?

What are the tradeoffs associated with using the following syntax to define the maximum value possible of an integer: uint256 max = type(uint256).max; as opposed to: uint256 max = 2**256 - 1;?
Marty
  • 133
  • 1
  • 2
  • 7
0
votes
1 answer

What causes a reentrancy error in this function?

function recoverContribution() public payable{ require(hasDeadlinePassed(), "deadline has not passed, contributions cannot be recovered rightnow"); require(!(address(this).balance >= minimumTarget), "target has been met, cannot…
Sam
  • 55
  • 6
0
votes
1 answer

solidity v0.8.15 : require & mapping issues on ETH mainnet

I'm working on a NFT management contrat; I can see everything works fine on rinkeby testnet, but when I'm calling the same functions on mainnet, I get errors many false errors with require. code was compiled on REMIX Ide; Here is an…
JFA
  • 1
  • 1
0
votes
1 answer

Call function of a already deployed smart contract from within my smart contract

i want to call the openTrade() function of this smart contract https://polygonscan.com/address/0xd8D177EFc926A18EE455da6F5f6A6CfCeE5F8f58#code (starts at line 371) from within my smart contract. I have read about the ABI but this does not seem to…
blossom
  • 15
  • 3
0
votes
1 answer

Can CREATE2 be used to simulate the nonce in CREATE?

Let's say there is a contract deployed on BSC, using CREATE, with a high tx nonce - for example 100. Now I need to deploy a contract to the same address on another network (ETH mainnet). Is there a way to match the address of the first contract,…
urban07
  • 61
  • 10
0
votes
1 answer

EVM(Solidity) "read" in "write" behavior

Let's see a Solidity pseudocode example: function myFunction() external payable onlyOwner { ExternalContract contract = ExternalContract(address); uint result = contract.readFunction(); required(result > 0, 'might failed here') //if FALSE…
Yurii
  • 1
  • 3
0
votes
1 answer

Can Ethereum transaction (calling contract function) fail for reasons other than assert()/require()/revert() or gas issues?

When running a private Ethereum network not requiring gas for transactions, can a contract function transaction fail for some "unpredictable" issue, other than explicit invocation of assert()/require()/revert(), for example dividing by 0 or some…
AndCode
  • 384
  • 1
  • 10
0
votes
1 answer

issues with installing fabric samples

some files are missing from the Fabric samples, docker images, and binaries download like the first-network folder and others. how do I get the missing files imported on vscode?
0
votes
0 answers

Solidity Error : gas required exceeds allowance (25000000)

Im struggling with some solidity error that makes no sense to me, when calling the distribute function of this contract : contract RewardsContract is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; …
Bulbuuu A
  • 1
  • 2
0
votes
1 answer

Solidity - OpenZeppeling/utils/Counters question

When we use the Counters library, we init it usually as such using Counters for Counters.Counter; Counters.Counter private _tokenIds; so far all good. Using Counters library methods for Counters.Counter (the struct in the library) and assigning…
0
votes
1 answer

brownie TransactionReceipt.wait(n) which value to avoid front run with geth?

I am new to these Ethereum topics and I was wondering how confirmations work and why the value can change? And the other question is if I have my own GETH node what value should I put to avoid the front run if I mine my own transaction this should…
truco
  • 17
  • 2