You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blockscout will incorrectly identify a contract as ERC-20, although it is actually not an ERC-20 contract. This will result in many erroneous queries to the node, such as balanceOf requests.
This whole contract source code example:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/access/Ownable.sol";
contract DepositETH is Ownable {
event Deposit(address indexed user, uint256 amount);
mapping(address => uint) public totalDeposits;
uint256 public totalUniqueDepositors;
constructor(address initialOwner) Ownable(initialOwner) {}
receive() external payable {
uint256 oldValue = totalDeposits[msg.sender];
if (oldValue == 0) {
totalUniqueDepositors++;
}
totalDeposits[msg.sender] += msg.value;
emit Deposit(msg.sender, msg.value);
}
function getTotalDepositOf(address user) external view returns (uint256) {
return totalDeposits[user];
}
function getTotalDepositFrom(
address[] calldata users
) external view returns (uint256[] memory) {
uint256[] memory result = new uint256[](users.length);
for (uint256 i = 0; i < users.length; i++) {
result[i] = totalDeposits[users[i]];
}
return result;
}
function withdraw() external onlyOwner {
payable(owner()).transfer(address(this).balance);
}
}
Deploy it to a network;
Send any amount to this contract.
You will get an "Unnamed token":
Type of the installation
Docker-compose
Type of the JSON RPC archive node
Geth
Type of the chain
No response
Link to the page
No response
Steps to reproduce
No response
Backend version
v6.3.0-beta
Frontend version
No response
Elixir & Erlang/OTP versions
Elixir
Operating system
No response
Additional information
No response
The text was updated successfully, but these errors were encountered:
Description
Due to this PR:
https://github.com/blockscout/blockscout/pull/7653/files#diff-f361e4f9074748318960424dc947ccec166d7630df1322526105b22749b7ac37R179
Blockscout will identify any contract that emits this event:
Blockscout will incorrectly identify a contract as ERC-20, although it is actually not an ERC-20 contract. This will result in many erroneous queries to the node, such as
balanceOf
requests.This whole contract source code example:
You will get an "Unnamed token":
Type of the installation
Docker-compose
Type of the JSON RPC archive node
Geth
Type of the chain
No response
Link to the page
No response
Steps to reproduce
No response
Backend version
v6.3.0-beta
Frontend version
No response
Elixir & Erlang/OTP versions
Elixir
Operating system
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: