当前位置:网站首页>PancakeSwap技术:夹子机器人系统开发原理
PancakeSwap技术:夹子机器人系统开发原理
2022-06-29 17:02:00 【KFZ433】
Pancake.php 开发包适用于为PHP应用快速增加对PancakeSwap协议的支持能力。即支持使用自有部署BSC区块链节点的应用场景,也支持使用第三方节点的轻量级部署场景。
1、开发包概述
Pancake.php开发包主要包含以下特性:
一键部署PancakeSwap协议,便于快速开发与测试
支持PancakeSwap协议的全部接口,并提供开发人员友好的API
支持BEP20/BEP20、BNB/BEP20等各种交易对的流动性添加、移除与兑换交易
支持自动做市价格计算与滑点计算
支持BSC交易gas用量与gas价格的自动估算与手动设定
支持EIP712签名授权,单一交易内完成流动性维护
Pancake.php开发包运行在 Php 7.1+ 环境下,当前版本1.0.0,主要类/接口及关系如下图所示:
Pancake.php开发包的主要代码文件清单如下:
2、使用示例代码 2.1 编译合约 在终端进入项目目录,执行如下命令编译PancakeSwap及开发包提供的测试Token合约:
登录后复制 ~$ cd ~/pancake.php ~/pancake.php$ bin/build-contracts
执行结果如下:
2.2 部署合约
首先在另一个终端启动开发私链:
~$ ganache-cli -d
然后进入项目demo目录,执行如下命令部署合约:
登录后复制
~$ cd ~/pancake.php/demo
~/pancake.php/demo$ php deploy-contracts.php
执行结果如下:
注意 :如果需要在BSC测试链或主链部署上述合约,或者使用其他参数 启动ganache-cli,需要修改demo/config.php中的账号配置
边栏推荐
- Which parameter is the partition information adjusted? The MySQL source stream API is used, not the table API
- Advanced MySQL - storage engine
- XAMPP Apache安装时问题总结
- 美国芯片再遭重击,Intel或将被台积电击败而沦落至全球第三
- 为防止被00后整顿,一公司招聘要求员工不能起诉公司
- 「科普大佬说」AI与创造力
- PCB板框的绘制——AD19
- Advanced webgl performance optimization
- Redolog and binlog
- Gradle download slow or unable to download
猜你喜欢

我的远程办公初体验 | 社区征文

A tour of grpc:02 - generate code from proto

Graduates are confused and middle-aged people are anxious. How can the career path become wider and wider?

手把手教你在windows上安装mysql8.0最新版本数据库,保姆级教学

MySQL foundation - multi table query

机器学习8-人工神经网络

How to use openmesh to realize the conversion between 3D files of different formats

@Component与@Configuration区别

自旋电子学笔记-张曙丰

微信小程序开发储备知识
随机推荐
Redis布隆过滤器和布谷鸟过滤器
XAMPP Apache安装时问题总结
c# 国内外ORM 框架 dapper efcore sqlsugar freesql hisql sqlserver数据常规插入测试性能对比
如何在 PowerPoint 中向幻灯片添加 SmartArt?
Actual combat | magical conic gradient
卷妹带你学数据库---5天冲刺Day1
Which is better and safer, GF e-gold or Dongfang fortune
关于XAMPP无法启动mysql数据库
卷妹带你学数据库---5天冲刺Day4
Leetcode 984. 不含 AAA 或 BBB 的字符串(网友思路)
c# 国内外ORM 框架 dapper efcore sqlsugar freesql hisql sqlserver数据常规插入测试性能对比
0基础自学STM32(野火)——使用寄存器点亮LED——GPIO功能框图讲解
GNN notes: message propagation model
Mathematical knowledge: finding combinatorial number II - finding combinatorial number
Basics | draw arcs in the physics engine
What memory consuming data is stored in MySQL CDC jobmanager?
What are the Commonwealth countries
535. TinyURL 的加密与解密 / 剑指 Offer II 103. 最少的硬币数目
Practice | solution for image upload, rotation and compression on mobile terminal
curl: (56) Recv failure: Connection reset by peer