Skip to content

Commit a1bce1d

Browse files
author
Max
committed
zeroex-go becomes (injective) sdk-go for future expansion.
1 parent 9780499 commit a1bce1d

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

coordinator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package zeroex
1+
package sdk
22

33
import (
44
"math/big"

eip712.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package zeroex
1+
package sdk
22

33
import (
44
"math/big"

encoder.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package zeroex
1+
package sdk
22

33
import (
44
"math/big"
@@ -8,7 +8,7 @@ import (
88
"github.com/ethereum/go-ethereum/common"
99
"github.com/pkg/errors"
1010

11-
"github.com/InjectiveLabs/zeroex-go/wrappers"
11+
"github.com/InjectiveLabs/sdk-go/wrappers"
1212
)
1313

1414
func OrdersToTrimmed(orders []*SignedOrder) []wrappers.Order {

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
module github.com/InjectiveLabs/zeroex-go
1+
module github.com/InjectiveLabs/sdk-go
22

3-
go 1.13
3+
go 1.15
44

55
require (
66
github.com/aristanetworks/goarista v0.0.0-20200410125653-0a3087568c00 // indirect

order.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package zeroex
1+
package sdk
22

33
import (
44
"encoding/json"
@@ -13,7 +13,7 @@ import (
1313
"github.com/pkg/errors"
1414
"golang.org/x/crypto/sha3"
1515

16-
"github.com/InjectiveLabs/zeroex-go/wrappers"
16+
"github.com/InjectiveLabs/sdk-go/wrappers"
1717
)
1818

1919
// Order represents an unsigned 0x order

ordervalidator/order_validator.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/ethereum/go-ethereum/common"
1010
"github.com/ethereum/go-ethereum/common/math"
1111

12-
zeroex "github.com/InjectiveLabs/zeroex-go"
12+
sdk "github.com/InjectiveLabs/sdk-go"
1313
)
1414

1515
const (
@@ -27,24 +27,24 @@ const (
2727
// machines with a `Code`
2828
type RejectedOrderInfo struct {
2929
OrderHash common.Hash `json:"orderHash"`
30-
SignedOrder *zeroex.SignedOrder `json:"signedOrder"`
30+
SignedOrder *sdk.SignedOrder `json:"signedOrder"`
3131
Kind RejectedOrderKind `json:"kind"`
3232
Status RejectedOrderStatus `json:"status"`
3333
}
3434

3535
// AcceptedOrderInfo represents an fillable order and how much it could be filled for
3636
type AcceptedOrderInfo struct {
37-
OrderHash common.Hash `json:"orderHash"`
38-
SignedOrder *zeroex.SignedOrder `json:"signedOrder"`
39-
FillableTakerAssetAmount *big.Int `json:"fillableTakerAssetAmount"`
40-
IsNew bool `json:"isNew"`
37+
OrderHash common.Hash `json:"orderHash"`
38+
SignedOrder *sdk.SignedOrder `json:"signedOrder"`
39+
FillableTakerAssetAmount *big.Int `json:"fillableTakerAssetAmount"`
40+
IsNew bool `json:"isNew"`
4141
}
4242

4343
type acceptedOrderInfoJSON struct {
44-
OrderHash string `json:"orderHash"`
45-
SignedOrder *zeroex.SignedOrder `json:"signedOrder"`
46-
FillableTakerAssetAmount string `json:"fillableTakerAssetAmount"`
47-
IsNew bool `json:"isNew"`
44+
OrderHash string `json:"orderHash"`
45+
SignedOrder *sdk.SignedOrder `json:"signedOrder"`
46+
FillableTakerAssetAmount string `json:"fillableTakerAssetAmount"`
47+
IsNew bool `json:"isNew"`
4848
}
4949

5050
// MarshalJSON is a custom Marshaler for AcceptedOrderInfo

signer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package zeroex
1+
package sdk
22

33
import (
44
"crypto/ecdsa"

transaction.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package zeroex
1+
package sdk
22

33
import (
44
"math/big"
@@ -137,8 +137,8 @@ func (data *ZeroExTransactionData) ValidateAssetFillAmounts() error {
137137
return err
138138
}
139139
return nil
140-
}else if data.isMatchOrdersFn(){
141-
if ((len(data.RightOrders) != len(data.LeftOrders)) || (len(data.RightOrders) != len(data.RightSignatures)) || (len(data.LeftSignatures) != len(data.RightSignatures))){
140+
} else if data.isMatchOrdersFn() {
141+
if (len(data.RightOrders) != len(data.LeftOrders)) || (len(data.RightOrders) != len(data.RightSignatures)) || (len(data.LeftSignatures) != len(data.RightSignatures)) {
142142
err := errors.Errorf("tx is %s but length of RightOrders/LeftOrders/RightSignatures/LeftSignatures do not match", data.FunctionName)
143143
return err
144144
}

0 commit comments

Comments
 (0)