跟我一起阅读并修复源码(3:编译工程,源码分析)之六

在上一章跟我一起阅读并修复某知名DEX交易所源码(3:编译工程,源码分析)之五_lixiaodog的博客-优快云博客

中我们详细分析了 contract MdexPair的源码,本章将继续编译的进程,来吧,少年,出发吧!!

输入编译命令truffle compile

project:/contracts/mainnet/CoinChef.sol:48:43: TypeError: Operator ** not compatible with types int_const 100 and int_const 1000000000000000000
    uint256 public constant mdxPerBlock = 100 ** 1e18;

**运算符无法用于这两个常数,我认为应该是写错了,修改为:

uint256 public constant mdxPerBlock = 100*10**18;

每区块产量100个。如果是100**1E18 ,是个多大的数大家可以想像。

再次编译,如下图:

> Duplicate contract names found for TransferHelper.
> This can cause errors and unknown behavior. Please rename one of your contracts.

> Duplicate contract names found for IWHT.
> This can cause errors and unknown behavior. Please rename one of your contracts.

> Duplicate contract names found for TransferHelper.
> This can cause errors and unknown behavior. Please rename one of your contracts.

> Duplicate contract names found for MdxToken.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值