Skip to content

Commit

Permalink
zeroex-go becomes (injective) sdk-go for future expansion.
Browse files Browse the repository at this point in the history
  • Loading branch information
Max committed Nov 8, 2020
1 parent 9780499 commit a1bce1d
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion coordinator.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zeroex
package sdk

import (
"math/big"
Expand Down
2 changes: 1 addition & 1 deletion eip712.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zeroex
package sdk

import (
"math/big"
Expand Down
4 changes: 2 additions & 2 deletions encoder.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zeroex
package sdk

import (
"math/big"
Expand All @@ -8,7 +8,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/pkg/errors"

"github.com/InjectiveLabs/zeroex-go/wrappers"
"github.com/InjectiveLabs/sdk-go/wrappers"
)

func OrdersToTrimmed(orders []*SignedOrder) []wrappers.Order {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/InjectiveLabs/zeroex-go
module github.com/InjectiveLabs/sdk-go

go 1.13
go 1.15

require (
github.com/aristanetworks/goarista v0.0.0-20200410125653-0a3087568c00 // indirect
Expand Down
4 changes: 2 additions & 2 deletions order.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zeroex
package sdk

import (
"encoding/json"
Expand All @@ -13,7 +13,7 @@ import (
"github.com/pkg/errors"
"golang.org/x/crypto/sha3"

"github.com/InjectiveLabs/zeroex-go/wrappers"
"github.com/InjectiveLabs/sdk-go/wrappers"
)

// Order represents an unsigned 0x order
Expand Down
20 changes: 10 additions & 10 deletions ordervalidator/order_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"

zeroex "github.com/InjectiveLabs/zeroex-go"
sdk "github.com/InjectiveLabs/sdk-go"
)

const (
Expand All @@ -27,24 +27,24 @@ const (
// machines with a `Code`
type RejectedOrderInfo struct {
OrderHash common.Hash `json:"orderHash"`
SignedOrder *zeroex.SignedOrder `json:"signedOrder"`
SignedOrder *sdk.SignedOrder `json:"signedOrder"`
Kind RejectedOrderKind `json:"kind"`
Status RejectedOrderStatus `json:"status"`
}

// AcceptedOrderInfo represents an fillable order and how much it could be filled for
type AcceptedOrderInfo struct {
OrderHash common.Hash `json:"orderHash"`
SignedOrder *zeroex.SignedOrder `json:"signedOrder"`
FillableTakerAssetAmount *big.Int `json:"fillableTakerAssetAmount"`
IsNew bool `json:"isNew"`
OrderHash common.Hash `json:"orderHash"`
SignedOrder *sdk.SignedOrder `json:"signedOrder"`
FillableTakerAssetAmount *big.Int `json:"fillableTakerAssetAmount"`
IsNew bool `json:"isNew"`
}

type acceptedOrderInfoJSON struct {
OrderHash string `json:"orderHash"`
SignedOrder *zeroex.SignedOrder `json:"signedOrder"`
FillableTakerAssetAmount string `json:"fillableTakerAssetAmount"`
IsNew bool `json:"isNew"`
OrderHash string `json:"orderHash"`
SignedOrder *sdk.SignedOrder `json:"signedOrder"`
FillableTakerAssetAmount string `json:"fillableTakerAssetAmount"`
IsNew bool `json:"isNew"`
}

// MarshalJSON is a custom Marshaler for AcceptedOrderInfo
Expand Down
2 changes: 1 addition & 1 deletion signer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zeroex
package sdk

import (
"crypto/ecdsa"
Expand Down
6 changes: 3 additions & 3 deletions transaction.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zeroex
package sdk

import (
"math/big"
Expand Down Expand Up @@ -137,8 +137,8 @@ func (data *ZeroExTransactionData) ValidateAssetFillAmounts() error {
return err
}
return nil
}else if data.isMatchOrdersFn(){
if ((len(data.RightOrders) != len(data.LeftOrders)) || (len(data.RightOrders) != len(data.RightSignatures)) || (len(data.LeftSignatures) != len(data.RightSignatures))){
} else if data.isMatchOrdersFn() {
if (len(data.RightOrders) != len(data.LeftOrders)) || (len(data.RightOrders) != len(data.RightSignatures)) || (len(data.LeftSignatures) != len(data.RightSignatures)) {
err := errors.Errorf("tx is %s but length of RightOrders/LeftOrders/RightSignatures/LeftSignatures do not match", data.FunctionName)
return err
}
Expand Down

0 comments on commit a1bce1d

Please sign in to comment.