This repository contains multiple files that can interact with EVM based blockchain with web3.php
- Clone and install package
$ git clone https://github.com/web3p/examples.git && cd examples && composer install
- Update exampleBase.php / ERC20.json / ERC721.json
Next, you can update these files (exampleBase.php / ERC20.json / ERC721.json), and have fun.
- erc20.php
Deploy erc20 token and tranfer tokens.
- nft.php
Deploy erc721 token and mint token.
- swap.php
Swap a token to b token on UniswapV2 based DEX, remember to find the right router and path.
- tx.php
Transfer eth / bsc to the other account.
- exampleBase.php / utils.php
Basic files for these examples.
Special thanks to https://twitter.com/aube_patrick for support this project.