Skip to content
/ examples Public

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

Notifications You must be signed in to change notification settings

web3p/examples

Repository files navigation

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages