Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebranding #120

Merged
merged 18 commits into from
Jan 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aggregator/api/gin/httpServer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"time"

apiErrors "github.com/ElrondNetwork/elrond-go/api/errors"
apiErrors "github.com/multiversx/mx-chain-go/api/errors"
)

type httpServer struct {
Expand Down
6 changes: 3 additions & 3 deletions aggregator/api/gin/httpServer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"net/http"
"testing"

"github.com/ElrondNetwork/elrond-go-core/core/check"
apiErrors "github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator/api/errors"
testsServer "github.com/ElrondNetwork/elrond-sdk-erdgo/testsCommon/server"
"github.com/multiversx/mx-chain-core-go/core/check"
apiErrors "github.com/multiversx/mx-sdk-go/aggregator/api/errors"
testsServer "github.com/multiversx/mx-sdk-go/testsCommon/server"
"github.com/stretchr/testify/assert"
)

Expand Down
12 changes: 6 additions & 6 deletions aggregator/api/gin/webServer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ import (
"net/http"
"sync"

"github.com/ElrondNetwork/elrond-go-core/marshal"
logger "github.com/ElrondNetwork/elrond-go-logger"
"github.com/ElrondNetwork/elrond-go/api/logs"
elrondShared "github.com/ElrondNetwork/elrond-go/api/shared"
"github.com/ElrondNetwork/elrond-sdk-erdgo/core"
"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
"github.com/multiversx/mx-chain-core-go/marshal"
"github.com/multiversx/mx-chain-go/api/logs"
mxChainShared "github.com/multiversx/mx-chain-go/api/shared"
logger "github.com/multiversx/mx-chain-logger-go"
"github.com/multiversx/mx-sdk-go/core"
)

var log = logger.GetOrCreate("api")

type webServer struct {
sync.RWMutex
httpServer elrondShared.HttpServerCloser
httpServer mxChainShared.HttpServerCloser
apiInterface string
cancelFunc func()
}
Expand Down
2 changes: 1 addition & 1 deletion aggregator/api/gin/webServer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"github.com/ElrondNetwork/elrond-go-core/core/check"
"github.com/multiversx/mx-chain-core-go/core/check"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions aggregator/api/gin/writers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "bytes"
type ginWriter struct {
}

// Write will output the message using elrond-go-logger's logger
// Write will output the message using mx-chain-logger-go's logger
func (gv *ginWriter) Write(p []byte) (n int, err error) {
trimmed := bytes.TrimSpace(p)
log.Trace("gin server", "message", string(trimmed))
Expand All @@ -16,7 +16,7 @@ func (gv *ginWriter) Write(p []byte) (n int, err error) {
type ginErrorWriter struct {
}

// Write will output the error using elrond-go-logger's logger
// Write will output the error using mx-chain-logger-go's logger
func (gev *ginErrorWriter) Write(p []byte) (n int, err error) {
trimmed := bytes.TrimSpace(p)
log.Trace("gin server", "error", string(trimmed))
Expand Down
2 changes: 1 addition & 1 deletion aggregator/computers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package aggregator_test
import (
"testing"

"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator"
"github.com/multiversx/mx-sdk-go/aggregator"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion aggregator/fetchers/binance.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator"
"github.com/multiversx/mx-sdk-go/aggregator"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion aggregator/fetchers/bitfinex.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator"
"github.com/multiversx/mx-sdk-go/aggregator"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion aggregator/fetchers/cryptocom.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator"
"github.com/multiversx/mx-sdk-go/aggregator"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion aggregator/fetchers/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package fetchers
import (
"fmt"

"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator"
"github.com/multiversx/mx-sdk-go/aggregator"
)

// MaiarTokensPair defines a base-quote pair of ids used by maiar exchange
Expand Down
2 changes: 1 addition & 1 deletion aggregator/fetchers/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator/mock"
"github.com/multiversx/mx-sdk-go/aggregator/mock"
"github.com/stretchr/testify/assert"
)

Expand Down
6 changes: 3 additions & 3 deletions aggregator/fetchers/fetchers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"testing"
"time"

"github.com/ElrondNetwork/elrond-go-core/core/check"
"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator"
"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator/mock"
"github.com/multiversx/mx-chain-core-go/core/check"
"github.com/multiversx/mx-sdk-go/aggregator"
"github.com/multiversx/mx-sdk-go/aggregator/mock"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion aggregator/fetchers/gemini.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator"
"github.com/multiversx/mx-sdk-go/aggregator"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion aggregator/fetchers/hitbtc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator"
"github.com/multiversx/mx-sdk-go/aggregator"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion aggregator/fetchers/huobi.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator"
"github.com/multiversx/mx-sdk-go/aggregator"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion aggregator/fetchers/kraken.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator"
"github.com/multiversx/mx-sdk-go/aggregator"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion aggregator/fetchers/maiar.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"time"

"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator"
"github.com/multiversx/mx-sdk-go/aggregator"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion aggregator/fetchers/okex.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator"
"github.com/multiversx/mx-sdk-go/aggregator"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions aggregator/graphqlResponseGetter.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"io"
"strings"

"github.com/ElrondNetwork/elrond-go-core/core/check"
"github.com/ElrondNetwork/elrond-sdk-erdgo/authentication"
"github.com/multiversx/mx-chain-core-go/core/check"
"github.com/multiversx/mx-sdk-go/authentication"
"golang.org/x/oauth2"
)

Expand Down
2 changes: 1 addition & 1 deletion aggregator/graphqlResponseGetter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/url"
"testing"

"github.com/ElrondNetwork/elrond-sdk-erdgo/authentication/mock"
"github.com/multiversx/mx-sdk-go/authentication/mock"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion aggregator/httpResponseGetter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/url"
"testing"

"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator"
"github.com/multiversx/mx-sdk-go/aggregator"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion aggregator/mock/priceNotifeeStub.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package mock
import (
"context"

"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator"
"github.com/multiversx/mx-sdk-go/aggregator"
)

// PriceNotifeeStub -
Expand Down
6 changes: 3 additions & 3 deletions aggregator/notifees/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package notifees
import (
"context"

"github.com/ElrondNetwork/elrond-sdk-erdgo/core"
"github.com/ElrondNetwork/elrond-sdk-erdgo/data"
"github.com/multiversx/mx-sdk-go/core"
"github.com/multiversx/mx-sdk-go/data"
)

// TxBuilder defines the component able to build & sign a transaction
Expand All @@ -13,7 +13,7 @@ type TxBuilder interface {
IsInterfaceNil() bool
}

// Proxy holds the primitive functions that the elrond proxy engine supports & implements
// Proxy holds the primitive functions that the multiversx proxy engine supports & implements
// dependency inversion: blockchain package is considered inner business logic, this package is considered "plugin"
type Proxy interface {
GetNetworkConfig(ctx context.Context) (*data.NetworkConfig, error)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ package notifees
import (
"context"

"github.com/ElrondNetwork/elrond-go-core/core/check"
logger "github.com/ElrondNetwork/elrond-go-logger"
"github.com/ElrondNetwork/elrond-sdk-erdgo/aggregator"
"github.com/ElrondNetwork/elrond-sdk-erdgo/builders"
"github.com/ElrondNetwork/elrond-sdk-erdgo/core"
"github.com/ElrondNetwork/elrond-sdk-erdgo/data"
"github.com/multiversx/mx-chain-core-go/core/check"
logger "github.com/multiversx/mx-chain-logger-go"
"github.com/multiversx/mx-sdk-go/aggregator"
"github.com/multiversx/mx-sdk-go/builders"
"github.com/multiversx/mx-sdk-go/core"
"github.com/multiversx/mx-sdk-go/data"
)

const zeroString = "0"
const txVersion = uint32(1)
const function = "submitBatch"
const minGasLimit = uint64(1)

var log = logger.GetOrCreate("elrond-sdk-erdgo/aggregator/notifees")
var log = logger.GetOrCreate("mx-sdk-go/aggregator/notifees")

// ArgsElrondNotifee is the argument DTO for the NewElrondNotifee function
type ArgsElrondNotifee struct {
// ArgsMxNotifee is the argument DTO for the NewMxNotifee function
type ArgsMxNotifee struct {
Proxy Proxy
TxBuilder TxBuilder
TxNonceHandler TransactionNonceHandler
Expand All @@ -29,7 +29,7 @@ type ArgsElrondNotifee struct {
GasLimitForEach uint64
}

type elrondNotifee struct {
type mxNotifee struct {
proxy Proxy
txBuilder TxBuilder
txNonceHandler TransactionNonceHandler
Expand All @@ -39,14 +39,14 @@ type elrondNotifee struct {
cryptoHolder core.CryptoComponentsHolder
}

// NewElrondNotifee will create a new instance of elrondNotifee
func NewElrondNotifee(args ArgsElrondNotifee) (*elrondNotifee, error) {
err := checkArgsElrondNotifee(args)
// NewMxNotifee will create a new instance of mxNotifee
func NewMxNotifee(args ArgsMxNotifee) (*mxNotifee, error) {
err := checkArgsMxNotifee(args)
if err != nil {
return nil, err
}

notifee := &elrondNotifee{
notifee := &mxNotifee{
proxy: args.Proxy,
txBuilder: args.TxBuilder,
txNonceHandler: args.TxNonceHandler,
Expand All @@ -59,7 +59,7 @@ func NewElrondNotifee(args ArgsElrondNotifee) (*elrondNotifee, error) {
return notifee, nil
}

func checkArgsElrondNotifee(args ArgsElrondNotifee) error {
func checkArgsMxNotifee(args ArgsMxNotifee) error {
if check.IfNil(args.Proxy) {
return errNilProxy
}
Expand Down Expand Up @@ -88,9 +88,9 @@ func checkArgsElrondNotifee(args ArgsElrondNotifee) error {
return nil
}

// PriceChanged is the function that gets called by a price notifier. This function will assemble an Elrond
// PriceChanged is the function that gets called by a price notifier. This function will assemble a MultiversX
// transaction, having the transaction's data field containing all the price changes information
func (en *elrondNotifee) PriceChanged(ctx context.Context, priceChanges []*aggregator.ArgsPriceChanged) error {
func (en *mxNotifee) PriceChanged(ctx context.Context, priceChanges []*aggregator.ArgsPriceChanged) error {
txData, err := en.prepareTxData(priceChanges)
if err != nil {
return err
Expand Down Expand Up @@ -132,7 +132,7 @@ func (en *elrondNotifee) PriceChanged(ctx context.Context, priceChanges []*aggre
return nil
}

func (en *elrondNotifee) prepareTxData(priceChanges []*aggregator.ArgsPriceChanged) ([]byte, error) {
func (en *mxNotifee) prepareTxData(priceChanges []*aggregator.ArgsPriceChanged) ([]byte, error) {
txDataBuilder := builders.NewTxDataBuilder()
txDataBuilder.Function(function)

Expand All @@ -148,6 +148,6 @@ func (en *elrondNotifee) prepareTxData(priceChanges []*aggregator.ArgsPriceChang
}

// IsInterfaceNil returns true if there is no value under the interface
func (en *elrondNotifee) IsInterfaceNil() bool {
func (en *mxNotifee) IsInterfaceNil() bool {
return en == nil
}
Loading