lihq1403/web3-helper

web3-helper

1.0.0 2022-05-30 07:22 UTC

This package is auto-updated.

Last update: 2024-08-29 06:18:09 UTC


README

web3-helper.

安装

$ 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测试

合约开发

用法

文件说明

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 // 交易

贡献

你可以通过以下三种方式之一进行贡献

  1. 使用 问题跟踪器 提交错误报告。
  2. 问题跟踪器 上回答问题或修复错误。
  3. 贡献新功能或更新wiki。

代码贡献过程并不非常正式。你只需确保遵循PSR-0、PSR-1和PSR-2编码规范。任何新的代码贡献都必须附有相应的单元测试(如果适用)。

许可

MIT