Skip to main content
4 votes

how to Get All tokens against a specific Walllet Addresse?

Here is an article that explains how to retrieve the balance of all ERC20 tokens from a wallet. It works with multiple blockchains (Ethereum, BNB, Polygon, Avalanche) and you can even check in a ...
Antonio U's user avatar
  • 649
3 votes

Where in the code of this unstake function is ETH actually transferred?

The BridgeRouterFacet contract's unstakeETH() function: function unstakeEth(address bridge, uint88 zethAmount) external nonReentrant onlyValidBridge(bridge) { if (...
Rohan Nero's user avatar
  • 1,577
2 votes
Accepted

Does the EVM revert if a call is attempted to an address that doesn't have code?

Calls to non-contract addresses (that is, EOAs or inactive accounts) always set the success flag to true and leave the return data field empty, so the right question isnt "Why lows level calls to ...
Foxxxey's user avatar
  • 4,307
2 votes
Accepted

How to concatenate 2 strings in Solidity?

With solidity 0.8.12 you can just do string.concat like so: function strConcat(string memory one, string memory two) external returns(string memory) { return string.concat(one, two); } ...
Olivier Demeaux's user avatar
2 votes
Accepted

Ethernaut Challenge Shop

The error is clear: since price() is view, then all expressions inside can't modify the state. The compiler thinks that isSold can modify state since it's not marked view, so we need to fix that. ...
0xSanson's user avatar
  • 3,154
2 votes

Two people calling this function at exactly the same time

Even if two transactions are created at virtually the same exact time, there will be a definite order decided upon by the miner/validator of the block where the transactions took place. This means ...
Rohan Nero's user avatar
  • 1,577
2 votes

How can I use BLS12-381 curve operations:EIP-2537, Whether it's on a public or private chain

While EIP-2537 (featuring BLS12-381) has not been approved nor finalized yet, you can run a private network supporting that precompile. In addition to that, there's a nice GitHub Solidity library (...
Mila A's user avatar
  • 1,179
1 vote

verify if a token is not a honeypot

Currently it is not possible to reliable detect honeypot tokens, or other scam tokens, on Ethereum, as discussed here. Any statistical analysis about token features and distributions is quite easy to ...
Mikko Ohtamaa's user avatar
1 vote

Can you refer to a contract inside itself?

Yes, it is perfectly valid to call a function from the same contract using the full contract name and function name, i.e. LibOrders.cancelOrder(). This is often done to avoid name collisions, ...
Mohit Kapadiya's user avatar
1 vote

Store addresses in bytes variable

Agree with Alex that what you're asking is a bit suspicious and there may be a better way to achieve whatever you're doing. But since this is a Q/A forum and not a product review... try: abi....
ori's user avatar
  • 346
1 vote

Can you return something only some of the time with a function in solidity?

In Solidity, a function that returns a value doesn't need to do so explicitly. For example take the following two functions: function sometimes(uint x) public pure returns(uint y) { if(x == 7) ...
Rohan Nero's user avatar
  • 1,577
1 vote

Revert inside a for loop

Yes, a revert within a loop inside a function triggers a full function revert due to its stack-based execution model, rolling back all changes made within the function.
DevCrypto's user avatar
  • 412
1 vote

Does the EVM revert if a call is attempted to an address that doesn't have code?

A call, any call, has a caller, can have a value and can have some data. The value can be zero, the data can be empty, doesn't matter. By default as explained in the chosen answer, all calls are valid....
Mouradif's user avatar
  • 289
1 vote

solidity doubt error unknown

This is not the case for you, but I'm going to leave this solution here for someone who may need this. I got this error when I forgot the semicolon ';' at the end of the first line pragma solidity ^0....
david raj's user avatar
1 vote

Where can I find how the Ethereum protocol calculates transaction fees, supply issuance, and other key components?

The full specification of the EVM can be found in the Yellow Paper. The Ethereum ecosystem has many client implementations of the Yellow Paper. The most widely used client is probably Geth (this ...
Markus Schick's user avatar

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