Waiting vs Not Waiting
The $transactionCount
obtained by calling getTransactionCount()
is only accurate if ALL the previously submitted transactions have been mined. There's some code that waits for the transaction to be mined. If the wait is removed or bypassed then it will be necessary to manually count how many transactions were submitted and manually increment $transactionCount
.
Search for information on the ethereum nonce to better understand the importance of the transaction count.
Requirements
- Manually install PHP 7.x (one of the packages doesn't support 8.x yet).
- Uncomment
extension=gmp
in your php.ini file. - Manually install php composer from https://getcomposer.org/.
Inital Setup
If this is the first time you've cloned this repository then run
- Run command
composer install
- Create
.env
file from.env.example
file
Running
php public/sendTokens.php 0xB3F0c9d503104163537Dd741D502117BBf6aF8f1 2 500000000000000000
Debugging
- Follow instructions at https://xdebug.org/wizard
- On Windows, if not specified make sure to rename the DLL to exactly
php_xdebug.dll
.
- On Windows, if not specified make sure to rename the DLL to exactly
- Add zend_extension = xdebug
- Start your debugger
- Run command
php -dxdebug.mode=debug -dxdebug.start_with_request=yes public/sendTokens.php 0xB3F0c9d503104163537Dd741D502117BBf6aF8f1 2 500000000000000000