New answers tagged foundry
1
vote
ZKsync deployment error: server returned an error response: error code 3: Failed to serialize transaction: toAddressIsNull
Despite the ZKsync documentation seeming to imply that the --zksync flag needing to be last, this issue arose due to the flag --constructor-args needing to be last:
forge create src/RebaseTokenPool....
2
votes
Accepted
What are μ,~ in the testing logs for foundry
μ (mu): represents the average gas usage across the fuzz test runs.
In your example:
μ: 31132
This means that the average gas consumption for the fuzzing test testFuzz_SetNumber(uint256) was 31,132 ...
0
votes
Accepted
How to call function with address[] memory parameter?
You can solve that by creating a dynamic array of fixed size instead of the static one, like:
address A = address(0x0);
address[] memory aa = new address[](1);
aa[0] = A;
X.initWallet(aa, 1, 0);
If ...
2
votes
Accepted
Using Forge, how can I output the contract content in the output metadata?
I believe what you're looking for is the use_literal_content compiler option:
If set to true, changes compilation to only use literal content and not URLs.
https://book.getfoundry.sh/reference/...
0
votes
How to expect a function call to not emit an event in foundry
It can be achieved with a combination of both vm.recordLogs and vm.getRecordedLogs.
function test_myFunction_NoLogs() public {
// Start recording logs.
vm.recordLogs();
// Execute logic.
...
0
votes
Why in foundry I got lib/forge-std/lib folder empty?
Use :- forge install foundry-rs/forge-std --no-commit
Add --no-commit flag ,if you are facing the error of github otherwise follow @AbdullahRizwan
0
votes
Sending transaction through web3 in React failing for contract managed in Foundry
There was a bug in the contracts. But I found that out by migrating the contract management to Hardhat. After using Hardhat, the error message in the React console said the error was from ...
Top 50 recent answers are included
Related Tags
foundry × 360solidity × 208
forge × 95
testing × 59
hardhat × 16
test × 16
fuzz-test × 16
solidity-0.8.x × 15
blockchain × 14
contract-deployment × 14
unittesting × 13
contract-development × 12
chainlink × 12
cast × 12
evm × 10
anvil × 9
web3js × 8
ether × 8
contract-debugging × 8
struct × 7
ethers.js × 7
invariant-test × 7
remix × 6
error × 6
openzeppelin × 6