lihq1403/web3-helper

1.0.0 2022-05-30 07:22 UTC

This package is auto-updated.

Last update: 2024-04-29 05:05:58 UTC


README

web3-helper.

Installing

$ composer require lihq1403/web3-helper -vvv

ganache本地开发环境

ganache 客户端下载:https://trufflesuite.com/ganache/

docker下载

docker run -d -p 8545:8545 --name ganache trufflesuite/ganache

bsc测试链

Network Name(网络名称):
                           bsc-testnet
New RPC URL(新增RPC URL):
                           https://data-seed-prebsc-1-s3.binance.org:8545/
                     (或者) https://data-seed-prebsc-1-s2.binance.org:8545/
                     (或者) https://data-seed-prebsc-2-s3.binance.org:8545/
                     (或者) https://data-seed-prebsc-2-s1.binance.org:8545/
                     (或者) https://data-seed-prebsc-1-s1.binance.org:8545/
                     (或者) https://data-seed-prebsc-2-s2.binance.org:8545/
Chain ID(链ID):
                           97
Currency Symbol (optional)(符号(选填)):
                           BNB
Block Explorer URL (optional)(币安智能链浏览器):
                           https://testnet.bscscan.com

bsc测试

合约开发

Usage

文件说明

src
├── Amount // 金额相关的计算
│   ├── AbstractAmount.php
│   ├── BnqBnrAmount.php
│   ├── EtherAmount.php
│   └── WeiAmount.php
├── BscHelper.php
├── Callback.php
├── Constants
│   ├── ErrorCode.php
│   └── Net.php
├── Contracts
│   └── ContractInterface.php
├── Credential.php // 账户
├── DTO
│   └── TransactorDTO.php
├── Exceptions
│   ├── ContractException.php
│   ├── NodeClientException.php
│   └── Web3HelperException.php
├── Kit.php // 工具
├── NodeClient.php // 节点
├── SmartContract.php // 智能合约
└── Transactor.php // 交易

Contributing

You can contribute in one of three ways:

  1. File bug reports using the issue tracker.
  2. Answer questions or fix bugs on the issue tracker.
  3. Contribute new features or update the wiki.

The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.

License

MIT