From 216f7294fc50a85d710488d173d7555003f21af9 Mon Sep 17 00:00:00 2001 From: olegfomenko Date: Wed, 26 Jun 2024 16:08:09 +0300 Subject: [PATCH] remove deprecated ops, adding missed identity transfer ops --- internal/cli/main.go | 2 -- internal/pool/catchupper.go | 4 ++-- internal/pool/subscriber.go | 22 ---------------------- 3 files changed, 2 insertions(+), 26 deletions(-) diff --git a/internal/cli/main.go b/internal/cli/main.go index eef76b9..fe3aa30 100644 --- a/internal/cli/main.go +++ b/internal/cli/main.go @@ -90,8 +90,6 @@ func Run(args []string) { go timer.NewBlockSubscriber(ctx.Timer(), ctx.Tendermint(), ctx.Log()).Run(ctx.Context()) go pool.NewTransferOperationSubscriber(ctx.Pool(), ctx.Tendermint(), ctx.Log()).Run(ctx.Context()) go pool.NewFeeManagementOperationSubscriber(ctx.Pool(), ctx.Tendermint(), ctx.Log()).Run(ctx.Context()) - go pool.NewContractUpgradeOperationSubscriber(ctx.Pool(), ctx.Tendermint(), ctx.Log()).Run(ctx.Context()) - go pool.NewIdentityTransferOperationSubscriber(ctx.Pool(), ctx.Tendermint(), ctx.Log()).Run(ctx.Context()) go pool.NewIdentityGISTTransferOperationSubscriber(ctx.Pool(), ctx.Tendermint(), ctx.Log()).Run(ctx.Context()) go pool.NewIdentityStateTransferOperationSubscriber(ctx.Pool(), ctx.Tendermint(), ctx.Log()).Run(ctx.Context()) go pool.NewIdentityAggregatedTransferOperationSubscriber(ctx.Pool(), ctx.Tendermint(), ctx.Log()).Run(ctx.Context()) diff --git a/internal/pool/catchupper.go b/internal/pool/catchupper.go index 9f6175a..00adc5a 100644 --- a/internal/pool/catchupper.go +++ b/internal/pool/catchupper.go @@ -12,11 +12,11 @@ import ( var acceptableOperationTypes = map[rarimo.OpType]struct{}{ rarimo.OpType_TRANSFER: {}, rarimo.OpType_FEE_TOKEN_MANAGEMENT: {}, - rarimo.OpType_CONTRACT_UPGRADE: {}, - rarimo.OpType_IDENTITY_DEFAULT_TRANSFER: {}, rarimo.OpType_IDENTITY_AGGREGATED_TRANSFER: {}, rarimo.OpType_WORLDCOIN_IDENTITY_TRANSFER: {}, rarimo.OpType_CSCA_ROOT_UPDATE: {}, + rarimo.OpType_IDENTITY_GIST_TRANSFER: {}, + rarimo.OpType_IDENTITY_STATE_TRANSFER: {}, rarimo.OpType_ARBITRARY: {}, } diff --git a/internal/pool/subscriber.go b/internal/pool/subscriber.go index 11844db..6f072c0 100644 --- a/internal/pool/subscriber.go +++ b/internal/pool/subscriber.go @@ -13,8 +13,6 @@ const ( OpServiceName = "op-subscriber" OpQueryTransfer = "tm.event='Tx' AND operation_approved.operation_type='TRANSFER'" OpQueryFeeManagement = "tm.event='NewBlock' AND operation_approved.operation_type='FEE_TOKEN_MANAGEMENT'" - OpQueryContractUpgrade = "tm.event='NewBlock' AND operation_approved.operation_type='CONTRACT_UPGRADE'" - OpQueryIdentityDefaultTransfer = "tm.event='Tx' AND operation_approved.operation_type='IDENTITY_DEFAULT_TRANSFER'" OpQueryIdentityGISTTransfer = "tm.event='Tx' AND operation_approved.operation_type='IDENTITY_GIST_TRANSFER'" OpQueryIdentityStateTransfer = "tm.event='Tx' AND operation_approved.operation_type='IDENTITY_STATE_TRANSFER'" OpQueryWorldCoinIdentityTransfer = "tm.event='Tx' AND operation_approved.operation_type='WORLDCOIN_IDENTITY_TRANSFER'" @@ -72,26 +70,6 @@ func NewIdentityStateTransferOperationSubscriber(pool *Pool, tendermint *http.HT } } -// NewIdentityTransferOperationSubscriber creates the subscriber instance for listening new identity transfer operations -func NewIdentityTransferOperationSubscriber(pool *Pool, tendermint *http.HTTP, log *logan.Entry) *OperationSubscriber { - return &OperationSubscriber{ - pool: pool, - log: log, - client: tendermint, - query: OpQueryIdentityDefaultTransfer, - } -} - -// NewContractUpgradeOperationSubscriber creates the subscriber instance for listening new contract upgrades operations -func NewContractUpgradeOperationSubscriber(pool *Pool, tendermint *http.HTTP, log *logan.Entry) *OperationSubscriber { - return &OperationSubscriber{ - pool: pool, - log: log, - client: tendermint, - query: OpQueryContractUpgrade, - } -} - // NewFeeManagementOperationSubscriber creates the subscriber instance for listening new fee token management operations func NewFeeManagementOperationSubscriber(pool *Pool, tendermint *http.HTTP, log *logan.Entry) *OperationSubscriber { return &OperationSubscriber{