vm.mockCall in Solidity

Posted on Mon 24 July 2023 in tech • Tagged with solidity, ethereum, programming, tutorial

mocking calls to specific addresses in solidity

Mocking a specific address signature in Solidity is useful for simulating expected behavior from an existing address or instance of a contract. In mock testing dependencies are replaced with simulated implementations to isolate the behavior of the funtion under test.

Proxy contracts that …


Continue reading

generate a random hex string in python

Posted on Thu 08 June 2023 in tech • Tagged with python, programming

Here is a simple gist that demonstrates how to generate a random hex string in Python. This is pseudo-random and designed only to be used for generating test data.


getting started with command line navigation using emacs

Posted on Fri 02 June 2023 in tech

Even for non-emacs users it can be powerful to understand the basic emacs command editing paradigm. Both Mac OS and the Unix and Linux shell allow emacs style command editing in text contexts. This basic introduction goes over the basics of emacs "chords" and control of the command line. An …


Continue reading

5 emacs tips for power users

Posted on Tue 30 May 2023 in tech

Emacs is a great system and worthwhile for any developer to spend some time learning and improving their skills. YouTube has plenty of introductions and tutorials to Emacs but very few tutorials aim at power users. Here are 5 tips for emacs users who would like to go to the …


Continue reading

importing more than one library with foundry

Posted on Fri 26 May 2023 in tech

One feature that is missing in Foundry and Forge is the ability to dynamically bind libraries. In fact, it can be pretty difficult to understand how to bind libraries in general and the documenation is fairly lacking. It took me several tries to get it right.

How do I link libraries with forge? Can't really find any docs

The docs are the …


Continue reading

Send email using an iCloud custom domain

Posted on Wed 24 May 2023 in tech • Tagged with python, icloud, smtp, email

Send email using an iCloud Custom Domain

I recently required a script to send email using an Apple iCloud Custom Domain. I found that the SMTP script I used before did not work because it attempted to login with my email address. The fix is to login with your apple …


Continue reading