ecadlabs / taquito

A library for building dApps on the Tezos Blockchain - JavaScript / TypeScript
https://taquito.io
Apache License 2.0
298 stars 116 forks source link

SPIKE: GetOperation from Indexers #705

Closed Innkst closed 3 years ago

Innkst commented 3 years ago

As a Taquito user that has an Operation Hash I want an API that I can use to fetch the Operation so that I can inspect the contents and status of that Operation

Background

The Tezos RPC node does not offer the ability to fetch an operation by operation hash (May be inplemented in future see Tezos Issue 1131).

Note, this is a spike, aka a prototype of implementation

Acceptance criteria:

Examples (mainnet)

Transaction https://tzstats.com/oogJQZM1bHNSzJ6egr6dAFweERUTmJLTjR7Nf9XbNrjMkQbddSs/39721104 A transaction transferring 1 XTZ token from one implicit account to another

Batch Operation w/ Delegation and Reveal https://tzstats.com/onwbonv722FrR2m8isDPgCz4XzSmkC4oaQEHcFsYw3SLiPgKE7y A batch operation with a delegation operation and a reveal operation.

Endorsement https://tzstats.com/ooiS1StmuxRTs6nVYM7kUgWCwVH5FKup1Rq1UGXkwcpY98RyLAK This is an endorsement operation.

Batch Operation w/ Call and Transfer https://tzstats.com/onsZtZR1xWQ3Un8zpJUadaTRbxJfMjaL343TdZQg3zbPYvJXU8Q/39938569 This operation has two items. A contract call, and a transfer of 0.005 XTZ tokens from an originated account (KT1) to an implicit account (TZ1).

Batch with reveal and contract origination https://tzstats.com/ooQfLJHv9k5upzZ8JKsXh8X2Cdef9FCur6Fz4ytFMkomo8mgzS7 This has operation has two items in its batch. A Public Key Reveal and a "New delegator" contract (an origination).

activate_account https://api.tzstats.com/explorer/op/ooXr5mXN7tvMXJ6TLRrbvugP6LAQ9LNuYEu4WffcAmpB6jQXSd6

double_baking_evidence https://api.tzstats.com/explorer/op/ooofziA3QbNVB3p7cEEAtYDVS8nQpeGPSMSJfqkJnbBWpk4G3sc

double_endorsement_evidence https://api.tzstats.com/explorer/op/ooxzQzgXJwmN2JauYvFAaLvvKPp5D8ioE8nBysj6aChQSiNuekb

proposals https://api.tzstats.com/explorer/op/onkZMtPcLbLQRfDfUpZC3UgiddNVaUYMdmdVFNEeWd5A1YoJHNR

ballot https://api.tzstats.com/explorer/op/ooy6d9GH6xCw6ue9uTXERxw8gLNKj6F1LgXWhEb44o5WcRsRALw

seed_nonce_revelation https://api.tzstats.com/explorer/op/op6mK17FpYUH931bTXZQQcac17FUjiUaAFo3nmYXGGfYATVKoZH

roxaneletourneau commented 3 years ago

Findings added to the notion page Taquito indexer package for this spike

Innkst commented 3 years ago

tzKT API was changed recently and we want to review it. We will review it before starting the actual implementation.