Path | Description |
---|---|
public/sendTokens.php | Example PHP code to show how to sign a transaction |
resources/Erc777TokenAbiArray.json | The ABI (Application Binary Interface) needed to interact with a smart contract |
contracts/Erc777Token.sol | An example of the solidity contract that was used to generate the ABI resources/Erc777TokenAbiArray.json |
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.
- 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/.
If this is the first time you've cloned this repository then run
- Run command
composer install
- Create
.env
file from.env.example
file
php public/sendTokens.php 0xB3F0c9d503104163537Dd741D502117BBf6aF8f1 2 500000000000000000
- 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