sean
@swabbie.eth
exp. with Foundry recently, and it's cool, but I'm a bit confused as to why testing in Solidity is preferred when it's highly likely interactions w/ your contract will need to use JS/TS anyway. 3P apps call your contract directly via frontend or they have a contract that calls your contract that itself uses a frontend
5 replies
0 recast
1 reaction
Varun Srinivasan
@v
Testing code written in one language using another language is a massive kludge (very rare that this happens, except maybe e2e tests) You introduce a lot of complexity at the boundary, translating objects from one language to another and back. That makes it hard to write good tests.
1 reply
0 recast
3 reactions
sean
@swabbie.eth
That makes sense, but since the goal of the contract is likely to often be called via a frontend, would it not also be wise to test via that use case? It seems poor practice to neglect an (often primary) interaction. In the past, my team has just written test contracts to test contract calls anyway, so both are tested
2 replies
0 recast
0 reaction