web3p / examples

Example scripts to use web3p libraries, including send transaction, swap tokens on dex exchange.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Examples

This repository contains multiple files that can interact with EVM based blockchain with web3.php

Usage

  • 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.

Files

  • 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.

About

Example scripts to use web3p libraries, including send transaction, swap tokens on dex exchange.


Languages

Language:PHP 100.0%