code is in https://gist.github.com/3913762 (is there a better way to attach it?) the problem is somewhere during the call to bobMainPurse.deposit(10, aliceMainPurse); With that line commented out, it runs. deposit involves passing around function pointers.