|
|
|
@ -450,11 +450,11 @@ public class ConfluxServiceImpl implements ConfluxService {
|
|
|
|
|
//保存日志记录
|
|
|
|
|
nftLog.setMethod(metod); |
|
|
|
|
nftLog.setHashCode(hash); |
|
|
|
|
nftLog.setNftIds(checkArgs.getId()); |
|
|
|
|
nftLog.setNftIds(new Gson().toJson(checkArgs.getNftIds())); |
|
|
|
|
nftLog.setGasUsed(est.getGasUsed()); |
|
|
|
|
NftBurn batchBurn = new NftBurn(); |
|
|
|
|
batchBurn.setContract(contract); |
|
|
|
|
batchBurn.setNftId(new Gson().toJson(checkArgs.getNftId())); |
|
|
|
|
batchBurn.setNftId(new Gson().toJson(checkArgs.getNftIds())); |
|
|
|
|
batchBurn.setCretaeTime(new Date()); |
|
|
|
|
batchBurn.setInformationTableId(checkArgs.getId()); |
|
|
|
|
asyncExecutorNftSaveData.execute(() -> { |
|
|
|
@ -471,7 +471,7 @@ public class ConfluxServiceImpl implements ConfluxService {
|
|
|
|
|
BigInteger[] bigIntegers = Arrays.stream(checkArgs.getNftIds()).map(BigInteger::new).toArray(BigInteger[]::new); |
|
|
|
|
List<BigInteger> tokenids = Arrays.asList(bigIntegers); |
|
|
|
|
est = confluxExecutor.getEstimateAirdrop(cfx, new Address(owner), |
|
|
|
|
new Address(contract), AddressUtil.getHexAddress(owner), Arrays.asList(checkArgs.getAddress()), tokenids); |
|
|
|
|
new Address(contract), AddressUtil.getHexAddress(owner), Arrays.asList(AddressUtil.getHexAddressToArry(checkArgs.getAddress())), tokenids); |
|
|
|
|
//判断所需要的费用
|
|
|
|
|
if (sponsoredBalanceForGas.compareTo(est.getGasUsed()) < 0) { |
|
|
|
|
return AjaxResult.error("代付余额不足"); |
|
|
|
@ -481,7 +481,7 @@ public class ConfluxServiceImpl implements ConfluxService {
|
|
|
|
|
opt.withGasLimit(est.getGasUsed()); |
|
|
|
|
opt.withStorageLimit(est.getStorageCollateralized()); |
|
|
|
|
hash = confluxExecutor.airdrop(opt, |
|
|
|
|
AddressUtil.getHexAddress(owner), Arrays.asList(checkArgs.getAddress()), tokenids |
|
|
|
|
AddressUtil.getHexAddress(owner), Arrays.asList(AddressUtil.getHexAddressToArry(checkArgs.getAddress())), tokenids |
|
|
|
|
); |
|
|
|
|
log.info("[--------------------->mintNft][hash],{}", hash); |
|
|
|
|
log.info("[--------------------->mintNft][time end]{}", +(DateUtil.currentSeconds() - start)); |
|
|
|
@ -489,7 +489,6 @@ public class ConfluxServiceImpl implements ConfluxService {
|
|
|
|
|
metod = ConfluxExecutor.AIRDROP; |
|
|
|
|
//保存日志记录
|
|
|
|
|
nftLog.setMethod(metod); |
|
|
|
|
nftLog.setNftNum(checkArgs.getIds().length); |
|
|
|
|
nftLog.setHashCode(hash); |
|
|
|
|
nftLog.setNftIds(Arrays.toString(tokenids.toArray())); |
|
|
|
|
nftLog.setGasUsed(est.getGasUsed()); |
|
|
|
|