4 votes
Accepted

What are the best online tools to easily make json rpc calls?

I've found the following 3 tools to be very useful for different use cases. https://ethereum.github.io/execution-apis/api-documentation/ https://justsmartcontracts.dev/#/ https://www.quicknode.com/...
MShakeG's user avatar
  • 1,099
3 votes
Accepted

Using `call()` function returns false when trying to call function of a smart contract

It's because you need to use full name for types. Just use uint256 instead of uint like this: (bool success, bytes memory data) = helloContract.call( abi.encodeWithSignature("set(uint256)&...
Olivier Demeaux's user avatar
2 votes
Accepted

How to encrypt "InputData" to use my smart contract to make it unreadable

To obfuscate the input so that etherscan cannot decode it : YES. To hide your contract's activity (ERC20 transfer): NO. Although you can obfuscate and hide your input data, people can see your ...
minhhn2910's user avatar
  • 1,670
2 votes

check if a DELEGATECALL has taken place during the transaction

I think you are right, considering that you cannot control or write the logic in A and B, it seems impossible. However, if we consider only your example of 3 contracts, there could be an expensive way ...
minhhn2910's user avatar
  • 1,670
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
  • 3,882
2 votes
Accepted

How does etherscan get such data?

I would like to add on to the previous answer for your specific case. Since you are looking for Sales on opensea, You will use web3.eth.getTransaction() and loop through the logs array that is ...
GrizzlyWebDev's user avatar
2 votes

How does etherscan get such data?

Yes, you can. There are a number of ways ERC20/ERC721 differ. API’s/node providers allow filtering dependant on certain aspects of transaction’s data to deduce what happened in that transaction. This ...
immaxkent's user avatar
  • 487
2 votes
Accepted

How can I add consumers to a Chainlink VRF2 subscription with an external smart contract?

I have found the issue. Looking at VRFCoordinatorV2.sol The function addConsumer has a modifier called onlySubOwner here. Which is not explicitly outlined in the docs. function addConsumer(uint64 ...
0xheartcode's user avatar
2 votes

Call smart contract method with ethers.js version 6

Look at this topic. EthersJS Listening to events with NodeJS Strange Errors It's a very similar issue and it turned out to be a bug from ethers.js 6. It is still beta and not official release, so it ...
Akall's user avatar
  • 423
2 votes
Accepted

How to encode arbitrary amount of parameters for encodeWithSignature without adding them to function definition?

Your problem is that you're using abi.encode with abi.encodeWithSignature, and encoding your address twice. abi.encode takes your address and pads it with zeros to make it 32 bytes long since EVM ...
Adam Boudj's user avatar
  • 2,301
2 votes
Accepted

simulate a transaction considering another pending transaction

Ethers6 staticCall, same as Ethers5 callStatic method, sends the eth_call RPC request. The nonce parameter is not supported, so it has no effect. The mempool for eth_call is completely ignored, and by ...
tenbits's user avatar
  • 1,834
2 votes

Using the Freeze functionality as a user in the BNB contract

I am not sure about about BNB provides with the UI, but I can tell you the raw method. You can visit etherscan https://etherscan.io/address/0xB8c77482e45F1F44dE1745F52C74426C631bDD52#writeContract ...
Zartaj Afser's user avatar
  • 1,257
1 vote
Accepted

calldata usage, difference between the method calling function with calldata

There is no difference; you are correct in assuming that this function was called in such a way: indeed calldata includes the function selector and data to be passed to that function.
immaxkent's user avatar
  • 487
1 vote
Accepted

Can you fetch the whole transaction history of specific contracts somewhere?

If you like to fetch specific contracts (or to an extent general account) address history, then you can use service such as Moralis. They have Transaction API that can help you index transaction data ...
Yoseph Kurnia Soenggoro's user avatar
1 vote

Can you fetch the whole transaction history of specific contracts somewhere?

Yes, there are several services that allow you to query all transactions related to a specific smart contract. Etherscan, for example, provides a "View Contract" feature that allows you to ...
vgonearth's user avatar
  • 139
1 vote
Accepted

Retrive data from chainlink node

So let's say we have Contract CallingAPIConsumer and Contract APIConsumer. You could have a function in CallingAPIConsumer that APIConsumer calls when fullfill() is executed, let's call it ...
shankar's user avatar
  • 109
1 vote

Best way to ignore the success status of a call?

With Foundry, there is a neat way to ignore Solidity compiler warnings, and that is to use the ignored_error_codes config option: # ignore solc warnings for missing license and exceeded contract size #...
Paul Razvan Berg's user avatar
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
  • 277
1 vote
Accepted

Do i need to fund my contracts with eth

Most likely not. The user who issues the transaction pays for the gas cost of the entire transaction. This includes any inner "sub" transactions which call subsequent contracts from the ...
Lauri Peltonen's user avatar
1 vote
Accepted

Why do I need a contract's code/abi to interact with it

You need to know the function signature or the function selector in order to encode the transaction data to be sent to that smart contract to interact with that specific function. Remix needs to know ...
Jeremy Then's user avatar
  • 4,439
1 vote
Accepted

Difference between contract address and contract instance on ethernaut

The instance address refers to the contract that you are interacting with. If you go to your console you can confirm this by typing: contract.address Which will match the instance address that is ...
Matt Sampson's user avatar
1 vote
Accepted

Can send some data from smart contract to an EOA by Solidity call statement?

Yes you can, but it does not send anything, and the EOA address does not receive anything (because it doesn't have bytecode logic to receive) contract Test { bool public success; bytes public ...
minhhn2910's user avatar
  • 1,670
1 vote

Using `call()` function returns false when trying to call function of a smart contract

Adding to what OliverD said, this works in Remix: pragma solidity 0.8.17; contract Main { event Response(bool successful, bytes data); function testCallSetInt(uint v) external { ...
Yongjian P.'s user avatar
  • 3,980
1 vote
Accepted

If a low-level call fails, are the state changes applied?

No, the state changes won't apply. Take the following code: // SPDX-License-Identifier: UNLICENSED pragma solidity >=0.8.13; contract Foo { uint256 public counter; function bumpCounter() ...
Paul Razvan Berg's user avatar
1 vote

Transaction consisting from transfers of 0 USDT

Carefull with this I think it is a new form of scamming that hackers are trying to do: https://mirror.xyz/x-explore.eth/cL3d_CyNujXq8XY7ueP4omNXx_IY1EG5Dz0FD0vJ90M
Vonwelzen's user avatar
1 vote
Accepted

Transaction consisting from transfers of 0 USDT

ERC20 tokens have a transfer function which allows you to send your own tokens, but also an approve and transferFrom function which allows you to approve a smart contract to take some of your tokens, ...
user253751's user avatar
1 vote

What are the best online tools to easily make json rpc calls?

ETH JSON RPC Not all RPC Endpoints will support all methods. RPC by UI We use this https://web3-rpc-debug.vercel.app -- is a fork of quicknodes tool (mentioned by Sahil Sen) but with updated code ...
Sam Bacha's user avatar
1 vote

How to initialize a smart contract using Remix?

your initialize function has a modifier initializer which i believe you are importing from here. The modifier requires you to call the initialize function while deploying the contract itself, you cant ...
0x4e696b68696c's user avatar
1 vote

How call() function works in solidity?

I read that we use call() only when we don't know the ABI of the called contract and we don't know its source code This isnt true and i wonder when you read that. As you already figured out, to call ...
Foxxxey's user avatar
  • 3,882
1 vote

What is a function signature and function selector in solidity (and EVM languages)?

@patrick-collins answer is useful, but I thought I'd add code to calculate the selector in TypeScript/ethers/hardhat: /** * Returns an Ethereum function selector given the function signature * @...
James Moore's user avatar

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