~/talk

Mocking of Internal Functions in Solidity Unit Tests

Talkat Solidity Summit 2022 · on Wednesday, 2022-04-20· [testing, developer-experience]
links:none on file
slides:none on file

A code-generation pipeline externalises internal functions by emitting wrapper contracts that delegate calls to a mocker contract, letting smock intercept and return controlled values; the generator inspects the AST, ABI and source to produce stubbed interfaces and Rescript/JS bindings. Tests run with smock and assert internal-call arguments and return values (one regression shows an off-by-5 failure), and initial Forge/Foundry integration is underway and functioning for basic cases.

AI-written summary · about

  1. 0:00The need for mock testing
  2. 0:52Testing strategy overview
  3. 2:30Auto-generating mock code
  4. 6:18Integration and live demo
  5. 10:42Q&A and future directions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.