Skip to content

Commit 5824e4e

Browse files
committed
chore: Updated all proto dependencies to the latest version of master branch of injective-core (future v1.16)
1 parent 7d83c17 commit 5824e4e

File tree

112 files changed

+28734
-3070
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+28734
-3070
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ clone-injective-indexer:
44
git clone https://github.com/InjectiveLabs/injective-indexer.git -b v1.15.6 --depth 1 --single-branch
55

66
clone-injective-core:
7-
git clone https://github.com/InjectiveLabs/injective-core.git -b cp-253/reduce-margin-ratio --depth 1 --single-branch
7+
git clone https://github.com/InjectiveLabs/injective-core.git -b master --depth 1 --single-branch
88

99
copy-exchange-client: clone-injective-indexer
1010
rm -rf exchange/*
@@ -51,6 +51,12 @@ copy-chain-types: clone-injective-core
5151
mkdir -p chain/auction/types && \
5252
cp injective-core/injective-chain/modules/auction/types/*.pb.go chain/auction/types && \
5353
cp injective-core/injective-chain/modules/auction/types/codec.go chain/auction/types
54+
mkdir -p chain/erc20/types && \
55+
cp injective-core/injective-chain/modules/erc20/types/*.go chain/erc20/types && \
56+
rm -rf chain/erc20/types/*test.go && rm -rf chain/erc20/types/*gw.go
57+
mkdir -p chain/evm/types && \
58+
cp injective-core/injective-chain/modules/evm/types/*.go chain/evm/types && \
59+
rm -rf chain/evm/types/*test.go && rm -rf chain/evm/types/*gw.go
5460
mkdir -p chain/exchange/types && \
5561
cp injective-core/injective-chain/modules/exchange/types/*.go chain/exchange/types && \
5662
rm -rf chain/exchange/types/*test.go && rm -rf chain/exchange/types/*gw.go

chain/auction/types/query.pb.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chain/auction/types/tx.pb.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chain/crypto/hd/algorithm.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ const (
2020
)
2121

2222
var (
23-
// SupportedAlgorithms defines the list of signing algorithms used on Ethermint:
23+
// SupportedAlgorithms defines the list of signing algorithms used on Injective:
2424
// - eth_secp256k1 (Ethereum)
2525
// - secp256k1 (Tendermint)
2626
SupportedAlgorithms = keyring.SigningAlgoList{EthSecp256k1, hd.Secp256k1}
27-
// SupportedAlgorithmsLedger defines the list of signing algorithms used on Ethermint for the Ledger device:
27+
// SupportedAlgorithmsLedger defines the list of signing algorithms used on Injective for the Ledger device:
2828
// - eth_secp256k1 (Ethereum)
2929
// - secp256k1 (Tendermint)
3030
SupportedAlgorithmsLedger = keyring.SigningAlgoList{EthSecp256k1, hd.Secp256k1}

chain/crypto/hd/hd_path.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package hd
2+
3+
import (
4+
ethaccounts "github.com/ethereum/go-ethereum/accounts"
5+
)
6+
7+
var (
8+
// Bip44CoinType satisfies EIP84. See https://github.com/ethereum/EIPs/issues/84 for more info.
9+
Bip44CoinType uint32 = 60
10+
11+
// BIP44HDPath is the default BIP44 HD path used on Ethereum.
12+
BIP44HDPath = ethaccounts.DefaultBaseDerivationPath.String()
13+
)
14+
15+
type (
16+
PathIterator func() ethaccounts.DerivationPath
17+
)
18+
19+
// NewPathIterator receives a base path as a string and a boolean for the desired iterator type and
20+
// returns a function that iterates over the base HD path, returning the string.
21+
func NewPathIterator(basePath string, ledgerIter bool) (PathIterator, error) {
22+
hdPath, err := ethaccounts.ParseDerivationPath(basePath)
23+
if err != nil {
24+
return nil, err
25+
}
26+
27+
if ledgerIter {
28+
return ethaccounts.LedgerLiveIterator(hdPath), nil
29+
}
30+
31+
return ethaccounts.DefaultIterator(hdPath), nil
32+
}

chain/erc20/types/codec.go

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package types
2+
3+
import (
4+
"github.com/cosmos/cosmos-sdk/codec"
5+
cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
6+
sdk "github.com/cosmos/cosmos-sdk/types"
7+
authzcdc "github.com/cosmos/cosmos-sdk/x/authz/codec"
8+
9+
// this line is used by starport scaffolding # 1
10+
"github.com/cosmos/cosmos-sdk/types/msgservice"
11+
)
12+
13+
const ModuleName = "erc20"
14+
15+
func RegisterCodec(cdc *codec.LegacyAmino) {
16+
cdc.RegisterConcrete(&MsgUpdateParams{}, "erc20/MsgUpdateParams", nil)
17+
cdc.RegisterConcrete(&MsgCreateTokenPair{}, "erc20/MsgCreateTokenPair", nil)
18+
cdc.RegisterConcrete(&MsgDeleteTokenPair{}, "erc20/MsgDeleteTokenPair", nil)
19+
}
20+
21+
func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
22+
registry.RegisterImplementations((*sdk.Msg)(nil),
23+
&MsgUpdateParams{},
24+
&MsgCreateTokenPair{},
25+
&MsgDeleteTokenPair{},
26+
)
27+
28+
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
29+
}
30+
31+
var (
32+
ModuleCdc = codec.NewLegacyAmino()
33+
)
34+
35+
func init() {
36+
RegisterCodec(ModuleCdc)
37+
// Register all Amino interfaces and concrete types on the authz Amino codec so that this can later be
38+
// used to properly serialize MsgGrant and MsgExec instances
39+
sdk.RegisterLegacyAminoCodec(ModuleCdc)
40+
RegisterCodec(authzcdc.Amino)
41+
ModuleCdc.Seal()
42+
}

0 commit comments

Comments
 (0)