change default param of send 1155nft

This commit is contained in:
zhl 2022-12-22 19:08:50 +08:00
parent 416ee4c517
commit 014c155318

View File

@ -246,7 +246,7 @@ export class ERC1155Standard {
const contract = new this.web3.eth.Contract(abiERC1155, address); const contract = new this.web3.eth.Contract(abiERC1155, address);
if (!gas) { if (!gas) {
gas = await contract.methods gas = await contract.methods
.safeBatchTransferFrom(from, to, tokenIds, amounts, "") .safeBatchTransferFrom(from, to, tokenIds, amounts, [])
.estimateGas({ gas: 1000000 }); .estimateGas({ gas: 1000000 });
} }
gas = (gas * 1.1) | 1; gas = (gas * 1.1) | 1;
@ -254,7 +254,7 @@ export class ERC1155Standard {
return jc.wallet.generateGasShow(gas); return jc.wallet.generateGasShow(gas);
} }
return contract.methods return contract.methods
.safeBatchTransferFrom(from, to, tokenIds, amounts, "") .safeBatchTransferFrom(from, to, tokenIds, amounts, [])
.send({ .send({
from, from,
gas, gas,