From d329f010d9bbd2d6cc2c926e34b6e989c4d6a7f8 Mon Sep 17 00:00:00 2001 From: Michael Pretorius Date: Fri, 11 Oct 2024 17:43:38 +0200 Subject: [PATCH] feat(claims): add intents and oracle approval payment --- app/ante.go | 10 +- app/keepers/keepers.go | 1 + docs/core/proto-docs.html | 777 +++++++++- docs/core/proto-docs.json | 859 ++++++++++- docs/core/proto-docs.md | 261 +++- docs/swagger-ui/swagger.yaml | 1807 ++++++++++++++++++++++-- proto/ixo/claims/v1beta1/authz.proto | 14 + proto/ixo/claims/v1beta1/claims.proto | 103 +- proto/ixo/claims/v1beta1/event.proto | 8 +- proto/ixo/claims/v1beta1/genesis.proto | 1 + proto/ixo/claims/v1beta1/query.proto | 26 + proto/ixo/claims/v1beta1/tx.proto | 84 +- wasmbinding/stargate_whitelist.go | 8 + x/bonds/types/tx.go | 2 - x/claims/abci.go | 50 + x/claims/autocli.go | 11 + x/claims/client/cli/tx.go | 24 + x/claims/keeper/claims.go | 190 +++ x/claims/keeper/genesis.go | 9 +- x/claims/keeper/grpc_query.go | 40 + x/claims/keeper/keeper.go | 35 +- x/claims/keeper/msg_server.go | 366 ++++- x/claims/keeper/payments.go | 107 +- x/claims/module.go | 7 + x/claims/types/authz.go | 73 +- x/claims/types/authz.pb.go | 308 +++- x/claims/types/claims.go | 159 ++- x/claims/types/claims.pb.go | 1508 ++++++++++++++++++-- x/claims/types/codec.go | 4 + x/claims/types/cw20.go | 22 +- x/claims/types/errors.go | 5 + x/claims/types/event.pb.go | 412 +++++- x/claims/types/expected_keepers.go | 7 + x/claims/types/genesis.pb.go | 103 +- x/claims/types/keys.go | 24 + x/claims/types/msg_validation.go | 60 +- x/claims/types/params.go | 11 +- x/claims/types/query.pb.go | 1295 ++++++++++++++--- x/claims/types/query.pb.gw.go | 228 +++ x/claims/types/tx.go | 24 + x/claims/types/tx.pb.go | 1501 ++++++++++++++++++-- 41 files changed, 9525 insertions(+), 1019 deletions(-) mode change 100755 => 100644 proto/ixo/claims/v1beta1/query.proto create mode 100644 x/claims/abci.go diff --git a/app/ante.go b/app/ante.go index f61de993..8f0fc399 100755 --- a/app/ante.go +++ b/app/ante.go @@ -68,6 +68,7 @@ func IxoAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { authante.NewSigGasConsumeDecorator(options.AccountKeeper, sigGasConsumer), authante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), authante.NewIncrementSequenceDecorator(options.AccountKeeper), + ibcante.NewRedundantRelayDecorator(options.IBCKeeper), ) // authenticatorVerificationDecorator is the new authenticator flow that's embedded into the circuit breaker ante @@ -92,16 +93,15 @@ func IxoAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { authante.NewValidateMemoDecorator(options.AccountKeeper), authante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), + // TODO: analyse how to make smart accounts work for iid handlers + iidante.NewIidResolutionDecorator(options.IidKeeper), + entityante.NewBlockNftContractTransferForEntityDecorator(options.EntityKeeper), + smartaccountante.NewCircuitBreakerDecorator( options.smartAccountKeeper, authenticatorVerificationDecorator, classicSignatureVerificationDecorator, ), - - ibcante.NewRedundantRelayDecorator(options.IBCKeeper), - // TODO: analyse how smart accounts affect iid handlers - iidante.NewIidResolutionDecorator(options.IidKeeper), - entityante.NewBlockNftContractTransferForEntityDecorator(options.EntityKeeper), } return sdk.ChainAnteDecorators(anteDecorators...), nil diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 0c3dcf32..2c36e63d 100755 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -528,6 +528,7 @@ func NewAppKeepers( appKeepers.BankKeeper, appKeepers.EntityKeeper, appKeepers.ContractKeeper, + appKeepers.AccountKeeper, ) // Initialize authenticators diff --git a/docs/core/proto-docs.html b/docs/core/proto-docs.html index 1744b582..3ed5cb24 100755 --- a/docs/core/proto-docs.html +++ b/docs/core/proto-docs.html @@ -565,6 +565,10 @@

Table of Contents

MEvaluation +
  • + MIntent +
  • +
  • MParams
  • @@ -578,6 +582,10 @@

    Table of Contents

    +
  • + ECollectionIntentOptions +
  • +
  • ECollectionState
  • @@ -586,6 +594,10 @@

    Table of Contents

    EEvaluationStatus +
  • + EIntentStatus +
  • +
  • EPaymentStatus
  • @@ -663,6 +675,14 @@

    Table of Contents

    MCollectionUpdatedEvent +
  • + MIntentSubmittedEvent +
  • + +
  • + MIntentUpdatedEvent +
  • +
  • MPaymentWithdrawCreatedEvent
  • @@ -745,6 +765,22 @@

    Table of Contents

    MQueryDisputeResponse +
  • + MQueryIntentListRequest +
  • + +
  • + MQueryIntentListResponse +
  • + +
  • + MQueryIntentRequest +
  • + +
  • + MQueryIntentResponse +
  • +
  • MQueryParamsRequest
  • @@ -768,6 +804,14 @@

    Table of Contents

    ixo/claims/v1beta1/tx.proto