From 5c7019609d14547d376b679a6deae92811a3072a Mon Sep 17 00:00:00 2001 From: Carlton N Hanna Date: Mon, 6 Nov 2023 11:21:32 -0700 Subject: [PATCH] Remove fee checks, ignore possible ibc ledger error, make vspn utility coin in configs --- .../explorer/grpc/extensions/MsgConverter.kt | 2 +- .../explorer/service/async/AsyncCachingV2.kt | 13 +++++++++---- .../resources/application-development.properties | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/service/src/main/kotlin/io/provenance/explorer/grpc/extensions/MsgConverter.kt b/service/src/main/kotlin/io/provenance/explorer/grpc/extensions/MsgConverter.kt index 8ec612ce..21a1c931 100644 --- a/service/src/main/kotlin/io/provenance/explorer/grpc/extensions/MsgConverter.kt +++ b/service/src/main/kotlin/io/provenance/explorer/grpc/extensions/MsgConverter.kt @@ -638,7 +638,7 @@ fun Any.getTxIbcClientChannel() = fun Any.getIbcLedgerMsgs() = when { - typeUrl.endsWith("MsgInbTransferRequest") || + typeUrl.endsWith("MsgIbcTransferRequest") || typeUrl.endsWith("MsgTransfer") || typeUrl.endsWith("MsgRecvPacket") || typeUrl.endsWith("MsgAcknowledgement") || diff --git a/service/src/main/kotlin/io/provenance/explorer/service/async/AsyncCachingV2.kt b/service/src/main/kotlin/io/provenance/explorer/service/async/AsyncCachingV2.kt index 98c07404..e12354c9 100644 --- a/service/src/main/kotlin/io/provenance/explorer/service/async/AsyncCachingV2.kt +++ b/service/src/main/kotlin/io/provenance/explorer/service/async/AsyncCachingV2.kt @@ -303,12 +303,16 @@ class AsyncCachingV2( val txUpdate = TxUpdate(tx) val txInfo = TxData(proposerRec.blockHeight, null, res.txResponse.txhash, blockTime) saveMessages(txInfo, res, txUpdate) - saveTxFees(res, txInfo, txUpdate, proposerRec) + // saveTxFees(res, txInfo, txUpdate, proposerRec) val addrs = saveAddresses(txInfo, res, txUpdate) val markers = saveMarkers(txInfo, res, txUpdate) saveNftData(txInfo, res, txUpdate) saveGovData(res, txInfo, txUpdate) - saveIbcChannelData(res, txInfo, txUpdate) + try { + saveIbcChannelData(res, txInfo, txUpdate) + } catch (e: Exception) { + logger.info("exception saving ibc data $e") + } saveSmartContractData(res, txInfo, txUpdate) saveNameData(res, txInfo) saveGroups(res, txInfo, txUpdate) @@ -868,11 +872,12 @@ class AsyncCachingV2( when (pair.first) { GroupGovMsgType.PROPOSAL -> { // Have to find the proposalId in the log events - val proposalId = tx.mapEventAttrValues( + val proposalIdB = tx.mapEventAttrValues( idx, GroupProposalEvents.GROUP_SUBMIT_PROPOSAL.event, GroupProposalEvents.GROUP_SUBMIT_PROPOSAL.idField.toList() - )[GroupProposalEvents.GROUP_SUBMIT_PROPOSAL.idField.first()]!!.toLong() + )[GroupProposalEvents.GROUP_SUBMIT_PROPOSAL.idField.first()] + val proposalId = proposalIdB!!.toLong() val msg = pair.second.toMsgSubmitProposalGroup() val nodeData = groupService.proposalAtHeight(proposalId, txInfo.blockHeight)?.proposal diff --git a/service/src/main/resources/application-development.properties b/service/src/main/resources/application-development.properties index 53ce166b..f6210a99 100644 --- a/service/src/main/resources/application-development.properties +++ b/service/src/main/resources/application-development.properties @@ -14,8 +14,8 @@ explorer.upgrade-github-repo=provenance-io/provenance explorer.hidden-apis=false explorer.swagger-url=localhost:8612 explorer.swagger-protocol=http -explorer.utility-token=nhash -explorer.utility-token-default-gas-price=1905 +explorer.utility-token=vspn +explorer.utility-token-default-gas-price=0 ## Used to format for DecCoins; should reflect the number of zeroes between base denom and display denom explorer.utility-token-base-decimal-places=9 ## Used to format the voting power; should reflect the difference of zeroes between the voting power setup and base denom