rosetta: upgrade to newest version (#9314)

* feat:  update rosetta sdk to v0.6.10 

embed from v1.0.0 release branch of the library: https://github.com/tendermint/cosmos-rosetta-gateway/tree/release/v1.0.0

closes:
https://github.com/cosmos/cosmos-sdk/issues/9300

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
This commit is contained in:
Andrea Giacobino
2021-05-15 00:18:59 +02:00
committed by GitHub
co-authored by Alessio Treglia
parent 925e63cf32
commit 25ecec6c15
29 changed files with 1036 additions and 57 deletions
@@ -7,6 +7,10 @@
- Alessio Treglia (@alessio)
- Frojdy Dymylja (@fdymylja)
## Changelog
- 2021-05-12: the external library [cosmos-rosetta-gateway](https://github.com/tendermint/cosmos-rosetta-gateway) has been moved within the SDK.
## Context
[Rosetta API](https://www.rosetta-api.org/) is an open-source specification and set of tools developed by Coinbase to
@@ -34,7 +38,7 @@ The driving principles of the proposed design are:
We will achieve these delivering on these principles by the following:
1. There will be an external repo called [cosmos-rosetta-gateway](https://github.com/tendermint/cosmos-rosetta-gateway)
1. There will be a package `rosetta/lib`
for the implementation of the core Rosetta API features, particularly:
a. The types and interfaces (`Client`, `OfflineClient`...), this separates design from implementation detail.
b. The `Server` functionality as this is independent of the Cosmos SDK version.
@@ -207,4 +211,3 @@ Proposed
## References
- https://www.rosetta-api.org/
- https://github.com/tendermint/cosmos-rosetta-gateway
+2 -4
View File
@@ -2,8 +2,6 @@
Package rosetta implements the rosetta API for the current cosmos sdk release series.
The client satisfies [cosmos-rosetta-gateway](https://github.com/tendermint/cosmos-rosetta-gateway) `Client` interface implementation.
## Extension
There are two ways in which you can customize and extend the implementation with your custom settings.
@@ -24,7 +22,7 @@ import (
"context"
"github.com/coinbase/rosetta-sdk-go/types"
"github.com/cosmos/cosmos-sdk/server/rosetta"
"github.com/cosmos/cosmos-sdk/server/rosetta/lib"
)
// CustomClient embeds the standard cosmos client
@@ -48,7 +46,7 @@ Example:
```go
package custom_errors
import crgerrs "github.com/tendermint/cosmos-rosetta-gateway/errors"
import crgerrs "github.com/cosmos/cosmos-sdk/server/rosetta/lib/errors"
var customErrRetriable = true
var CustomError = crgerrs.RegisterError(100, "custom message", customErrRetriable, "description")