An example of address prediction via create2
:
$ truffle deploy --reset
$ truffle exec scripts/predictAddress.js
predictedAddress : 0x0e0ba11898ebef07da013152ec9858038a0995e5 (predicted)
realAddress : 0x0e0ba11898ebef07da013152ec9858038a0995e5 (real)
Debugging:
add debugger;
anywhere in the script scripts/predictAddress.js
and run this:
node inspect `which truffle` exec scripts/predictAddress.js
Articles: