New answers tagged

1 vote

How to develop while experiencing very high Goerli testnet gas fees after merge?

As of October 2022, Ethernaut is now working on the following L1, L2 and sidechain testnets 🚀 Goerli Sepolia Mumbai - Polygon Goerli - Arbitrum Goerli - Optimism As of March 2023, I recommend using ...
1 vote

How to implement negation in Solidity?

In solidity the smallest value for uint256 is 0 so it can never be negative. If you want to put negative you can use int256 type which value can be -2^256 to 2^256. So you can easily implement that ...
  • 778
1 vote

How to implement negation in Solidity?

I'll start with a refresher on how to compute the two's complement of a number: represent it in binary, invert all its bits (i.e., change all 0s to 1s and all 1s to 0s), and then add 1 to the result. ...
1 vote

How to make NFT data fetching tools on EVM blockchain like the Moralis?

Developer advocate from Chainstack here. TL, DR: You need to index the data by yourself, which requires re-executing many historical transactions. Essentially all NFT ownership data and Metadata are ...
0 votes
Accepted

Disk size of EVM when it is loaded

Developer advocate from Chainstack here. Validating on Ethereum needs two clients - consensus client and execution client- to work cohesively together. In very simple terms: An execution client does ...
0 votes

Begin a career as a core blockchain developer especially in EVM blockchains

My primary objective is to build my blockchain by forking Geth GoEthereum is the oldest and one of the most legacy node applications. It means it is crufty and not that great in many aspects. If you ...
1 vote
Accepted

Begin a career as a core blockchain developer especially in EVM blockchains

Forking geth is one possibility, of course... But maybe you would be better guided, and would have a lot more documentation, by checking Cosmos SDK and building your chain with that toolbox. It's also ...
  • 466
1 vote

bn.inherits is not a function in snarkjs

I just got this error using the latest snarkjs.min.js from github/iden3 I had an older file from early 2023 and it works find with no error. I suggest downloading a file from the git history.
1 vote

Are the previous contracts affected if some opcode changed or were removed?

Just so we're clear and for anyone else who happens upon this question, OPCODES are instructions that are executed by the EVM. Solidity is a compiler that generates bytecode - the machine-readable ...
  • 53.9k
0 votes

Are the previous contracts affected if some opcode changed or were removed?

Each contract will have a pragma solidity version specify the version it was built for. When the contract is compiled into bytecode and deployed, it no longer cares about version changes and ...
  • 36
0 votes

How to develop while experiencing very high Goerli testnet gas fees after merge?

Change your gas fee setting when the gas fee approval pops up I just had it trying to charge me 0.2 to 0.4 and change the settings on the gwei to lower values and got it down to 0.003 So try that and ...
  • 1
1 vote
Accepted

Do read-only and static calls have any gas limitations even though they don't charge gas fees?

In short yes there is a limit but it depends on the way you call view function . There are three ways you can call view/pure function . 1 - Directly on chain i mean you can just send tx to contract ...
  • 26
1 vote

Do read-only and static calls have any gas limitations even though they don't charge gas fees?

Theoretically it should work. If the array is too large, https connections may break becuase of delay in reading all the data. I tried something similar but array length was ~100. Try to avoid arrays, ...
1 vote
Accepted

How to programatically get state change of a transaction?

You'll need to use one of the "trace" RPC methods for transactions. Here's a decent write-up on the matter (link). For transactions involving tokens (so anything that's not ETH), the ...
  • 26
0 votes
Accepted

Does the size of a state variable in a smart contract's storage impact the cost of a transaction?

The reads and writes are deterministic and of constant complexity for the same Data Element Type and Data Element Size, the current size (amount of elements) of an array or a mapping has no impact.
  • 869
0 votes

Does the size of a state variable in a smart contract's storage impact the cost of a transaction?

State variables are stored directly on the blockchain so they can impact the transaction cost if modification of that state variable is being done in that transaction. As in your scenario, the ...

Top 50 recent answers are included