修正一些gas计算未严格转化成整数的bug
This commit is contained in:
parent
14e92fd53f
commit
19b7e53c96
@ -249,7 +249,7 @@ export class ERC1155Standard {
|
||||
.safeBatchTransferFrom(from, to, tokenIds, amounts)
|
||||
.estimateGas({ gas: 1000000 });
|
||||
}
|
||||
gas = gas * 1.1;
|
||||
gas = (gas * 1.1) | 1;
|
||||
if (estimate) {
|
||||
return jc.wallet.generateGasShow(gas);
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ export class ERC20Standard {
|
||||
.transfer(to, amountBN)
|
||||
.estimateGas({ gas: 1000000 });
|
||||
}
|
||||
gas = gas * 1.1;
|
||||
gas = (gas * 1.1) | 1;
|
||||
if (estimate) {
|
||||
return jc.wallet.generateGasShow(gas);
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ export class ERC721Standard {
|
||||
.safeTransferFrom(from, to, tokenId)
|
||||
.estimateGas({ gas: 1000000 });
|
||||
}
|
||||
gas = gas * 1.1;
|
||||
gas = (gas * 1.1) | 1;
|
||||
if (estimate) {
|
||||
return jc.wallet.generateGasShow(gas);
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ export class JCStandard {
|
||||
}
|
||||
return contract.methods
|
||||
.evolve721NFT(nftAddress, tokenIds, startTime, nonce, signature)
|
||||
.send({ gas: (gas * 1.1) | 0 });
|
||||
.send({ gas });
|
||||
}
|
||||
|
||||
async evolveChip({
|
||||
|
Loading…
x
Reference in New Issue
Block a user