Skip to content

Commit

Permalink
Merge pull request #146 from okex/green/upgrade
Browse files Browse the repository at this point in the history
upgrage exchain into v0.19.17 & add a new way to send evm tx
  • Loading branch information
banishee authored Dec 2, 2021
2 parents b1c15d6 + 2472921 commit cb69892
Show file tree
Hide file tree
Showing 90 changed files with 206 additions and 277 deletions.
2 changes: 1 addition & 1 deletion alias.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gosdk

import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdk "github.com/okex/exchain/libs/cosmos-sdk/types"
ammswap "github.com/okex/exchain-go-sdk/module/ammswap/types"
auth "github.com/okex/exchain-go-sdk/module/auth/types"
backend "github.com/okex/exchain-go-sdk/module/backend/types"
Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gosdk
import (
"fmt"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/okex/exchain/libs/cosmos-sdk/codec"
"github.com/okex/exchain-go-sdk/exposed"
"github.com/okex/exchain-go-sdk/module"
"github.com/okex/exchain-go-sdk/module/ammswap"
Expand Down
4 changes: 2 additions & 2 deletions exposed/ammswap.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package exposed

import (
"github.com/cosmos/cosmos-sdk/crypto/keys"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/okex/exchain-go-sdk/module/ammswap/types"
gosdktypes "github.com/okex/exchain-go-sdk/types"
"github.com/okex/exchain/libs/cosmos-sdk/crypto/keys"
sdk "github.com/okex/exchain/libs/cosmos-sdk/types"
)

// AmmSwap shows the expected behavior for inner ammswap client
Expand Down
4 changes: 2 additions & 2 deletions exposed/dex.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package exposed

import (
"github.com/cosmos/cosmos-sdk/crypto/keys"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/okex/exchain/libs/cosmos-sdk/crypto/keys"
sdk "github.com/okex/exchain/libs/cosmos-sdk/types"
"github.com/okex/exchain-go-sdk/module/dex/types"
gosdktypes "github.com/okex/exchain-go-sdk/types"
)
Expand Down
4 changes: 2 additions & 2 deletions exposed/distribution.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package exposed

import (
"github.com/cosmos/cosmos-sdk/crypto/keys"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/okex/exchain/libs/cosmos-sdk/crypto/keys"
sdk "github.com/okex/exchain/libs/cosmos-sdk/types"
gosdktypes "github.com/okex/exchain-go-sdk/types"
)

Expand Down
10 changes: 7 additions & 3 deletions exposed/evm.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
package exposed

import (
"github.com/cosmos/cosmos-sdk/crypto/keys"
sdk "github.com/cosmos/cosmos-sdk/types"
"crypto/ecdsa"
"math/big"

ethcmn "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
ethcore "github.com/ethereum/go-ethereum/core/types"
"github.com/okex/exchain-go-sdk/module/evm/types"
gosdktypes "github.com/okex/exchain-go-sdk/types"
rpctypes "github.com/okex/exchain/app/rpc/types"
"github.com/okex/exchain/libs/cosmos-sdk/crypto/keys"
sdk "github.com/okex/exchain/libs/cosmos-sdk/types"
)

// Evm shows the expected behavior for inner farm client
Expand All @@ -26,7 +29,8 @@ type EvmTx interface {
sdk.TxResponse, error)
CreateContract(fromInfo keys.Info, passWd, amountStr, payloadStr, memo string, accNum, seqNum uint64) (
sdk.TxResponse, string, error)
SendTxEthereum(privHex, toAddrStr, amountStr, payloadStr string, gasLimit, seqNum uint64) (sdk.TxResponse, error)
SendTxEthereum2(privHex, toAddrStr, amountStr, payloadStr string, gasLimit, seqNum uint64) (sdk.TxResponse, error)
SendTxEthereum(priv *ecdsa.PrivateKey, nonce uint64, to ethcmn.Address, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte) (resp sdk.TxResponse, err error)
CreateContractEthereum(privHex, amountStr, payloadStr string, gasLimit, seqNum uint64) (sdk.TxResponse, error)
}

Expand Down
4 changes: 2 additions & 2 deletions exposed/farm.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package exposed

import (
"github.com/cosmos/cosmos-sdk/crypto/keys"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/okex/exchain/libs/cosmos-sdk/crypto/keys"
sdk "github.com/okex/exchain/libs/cosmos-sdk/types"
"github.com/okex/exchain-go-sdk/module/farm/types"
gosdktypes "github.com/okex/exchain-go-sdk/types"
)
Expand Down
4 changes: 2 additions & 2 deletions exposed/governance.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package exposed

import (
"github.com/cosmos/cosmos-sdk/crypto/keys"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/okex/exchain/libs/cosmos-sdk/crypto/keys"
sdk "github.com/okex/exchain/libs/cosmos-sdk/types"
"github.com/okex/exchain-go-sdk/module/governance/types"
gosdktypes "github.com/okex/exchain-go-sdk/types"
)
Expand Down
4 changes: 2 additions & 2 deletions exposed/order.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package exposed

import (
"github.com/cosmos/cosmos-sdk/crypto/keys"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/okex/exchain/libs/cosmos-sdk/crypto/keys"
sdk "github.com/okex/exchain/libs/cosmos-sdk/types"
"github.com/okex/exchain-go-sdk/module/order/types"
gosdktypes "github.com/okex/exchain-go-sdk/types"
)
Expand Down
4 changes: 2 additions & 2 deletions exposed/slashing.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package exposed

import (
"github.com/cosmos/cosmos-sdk/crypto/keys"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/okex/exchain/libs/cosmos-sdk/crypto/keys"
sdk "github.com/okex/exchain/libs/cosmos-sdk/types"
gosdktypes "github.com/okex/exchain-go-sdk/types"
)

Expand Down
4 changes: 2 additions & 2 deletions exposed/staking.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package exposed

import (
"github.com/cosmos/cosmos-sdk/crypto/keys"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/okex/exchain/libs/cosmos-sdk/crypto/keys"
sdk "github.com/okex/exchain/libs/cosmos-sdk/types"
"github.com/okex/exchain-go-sdk/module/staking/types"
gosdktypes "github.com/okex/exchain-go-sdk/types"
)
Expand Down
2 changes: 1 addition & 1 deletion exposed/tendermint.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package exposed
import (
"github.com/okex/exchain-go-sdk/module/tendermint/types"
gosdktypes "github.com/okex/exchain-go-sdk/types"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
ctypes "github.com/okex/exchain/libs/tendermint/rpc/core/types"
)

// Tendermint shows the expected behavior for inner tendermint client
Expand Down
4 changes: 2 additions & 2 deletions exposed/token.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package exposed

import (
"github.com/cosmos/cosmos-sdk/crypto/keys"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/okex/exchain/libs/cosmos-sdk/crypto/keys"
sdk "github.com/okex/exchain/libs/cosmos-sdk/types"
"github.com/okex/exchain-go-sdk/module/token/types"
gosdktypes "github.com/okex/exchain-go-sdk/types"
)
Expand Down
10 changes: 3 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,13 @@ go 1.15

require (
github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d
github.com/cosmos/cosmos-sdk v0.39.2
github.com/ethereum/go-ethereum v1.10.8
github.com/golang/mock v1.5.0
github.com/okex/exchain v0.19.9
github.com/okex/exchain v0.19.17
github.com/stretchr/testify v1.7.0
github.com/tendermint/tendermint v0.33.9
)

replace (
github.com/cosmos/cosmos-sdk => github.com/okex/cosmos-sdk v0.39.2-exchain17
github.com/tendermint/iavl => github.com/okex/iavl v0.14.3-exchain2
github.com/tendermint/tendermint => github.com/okex/tendermint v0.33.9-exchain13
github.com/tendermint/tm-db => github.com/okex/tm-db v0.5.2-exchain1
github.com/tendermint/go-amino => github.com/okex/go-amino v0.15.2-0.20211120080923-5ccee577b032
github.com/tendermint/tm-db => github.com/okex/tm-db v0.5.3-0.20211118074832-0d08619b97fe
)
Loading

0 comments on commit cb69892

Please sign in to comment.