New answers tagged

0

Let's find out the answer empirically, with Remix. Take this contract: // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.9; contract SingleConstant { uint256 internal foo; function getFoo() external view returns (uint256) { return foo; } function getFoo(uint256 newFoo) external { foo = newFoo; } } ...


1

If you want contract A to call a function of contract B and use the storage of contract B, that's simply calling a function on contract B. There is nothing fancy about it, as this is the basis of contract interactions. Under the hood, the Solidity compiler transforms your function call into a CALL. Now, if what you want to do is call contract B's function ...


0

For the first 2 question, here is what I know: Yes and no, when you create a new contract, you send the bytecode of that contract to the ethereum so everybody will know about the contract so you can store the contract bytecode elsewhere with geth. So technique the bytecode is always on the ethereum through the contract creation transaction, but you will ...


Top 50 recent answers are included