1
vote
Accepted
Extracting input data when writing Forge tests/POCs
Assuming that you are referring to a transaction that was included in previous blocks for a particular chain, you can get the transaction receipt using cast and decode the transaction data within the ...
1
vote
Accepted
When testing Chainlink CCIP with Router.sol, what address should the onRamp be?
The getFee() call comes from the EVM2EVMOnRamp.sol smart contract.
So you need to either provide its actual address on the source blockchain, assuming you are using the forking method for testing, or ...
1
vote
How to unit test contract private and internal functions?
For anyone using Foundry, the recommended advice for testing internal functions is to inherit and expose them as external ones.
This can be done directly in the .t.sol file, so you don't have to worry ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
testing × 650solidity × 289
truffle × 188
hardhat × 149
unittesting × 55
ethers.js × 47
mocha × 43
javascript × 42
foundry × 41
contract-development × 40
testrpc × 38
truffle-test × 36
go-ethereum × 30
testnets × 30
chai × 30
web3js × 29
ganache × 26
remix × 22
blockchain × 18
erc-20 × 18
test × 16
events × 15
contract-deployment × 14
contract-debugging × 13
ether × 12