~/talk

Python Unittesting for Ethereum Smart Contracts or how not to create your own Crypto

Talkat PyData Berlin 2018 · 2018-07-06..07-08· [security]
slides:none on file

Claims that Python can unit test Ethereum smart contracts get shown with concrete tools and failures: Populus is used to create an in‑memory chain and accounts fixtures, deploy Solidity bytecode, call transact and chain wait_for_receipt, and assert state changes. A little Snowballs game is deployed and its tests pass (first run), but a logic bug lets a player throw at themselves and mint snowballs, illustrating real risks like the DAO \$50,000,000 loss and the Parity \$150,000,000 freeze; constructor gives 100 snowballs.

AI-written summary · about

  1. 0:00Python and Ethereum intro
  2. 1:31Blockchain and Ethereum basics
  3. 12:57Smart contracts and EVM
  4. 16:33Smart contract risks
  5. 19:49Testing with Populus
  6. 21:36Live demo: snowball game
  7. 24:05First unit test: snowball game
  8. 26:13Adding throw functionality
  9. 27:39Testing throw ball transaction
  10. 29:56Fixing contract vulnerabilities
  11. 31:00Key takeaways
  12. 32:50Q&A
~/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.