Questions tagged [foundry-rs]

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.

Foundry consists of:

  • Forge: Ethereum testing framework (like Truffle, Hardhat and DappTools).
  • Cast: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
  • Anvil: Local Ethereum node, akin to Ganache, Hardhat Network.
  • Chisel: Fast, utilitarian, and verbose solidity REPL.

Read more

foundry-rs tag is used to separate it from other Foundry projects on StackOverflow.

2 questions
1
vote
0 answers

Is there any way to mock an external call with more results in Foundry?

I'm trying to write unit tests in Foundry and I've quite enjoyed the ability to mock external calls using function mockCall(address where, uint256 value, bytes calldata data, bytes calldata retdata) external. However, I can't figure out if there's…
0
votes
0 answers

A simple vault saving IERC20, but fails a simple foundry test

I wrote a simple vault for a particular IERC20 contract. // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; import "forge-std/interfaces/IERC20.sol"; contract BasicVault { mapping (address => uint) user_to_balance_; IERC20…
zuanyg
  • 71
  • 1
  • 1
  • 5