Skip to content

Commit 680fe94

Browse files
aarmoameetrick
andauthored
Release/v1.57 for chain v1.15 (#302)
* feat: removed the deprecated pre-commit repo pre-commit-golang. Added new CI step to run golangci-lint using the github action * fix: added skip directories into the golanci lint config * fix: fixed lint errors * fix: fixed lint errors * feat: updated proto definitions for the chain upgrade v1.15 * fix: synced go.mod dependecnies with Injective core * fix: fixed lint errors * fix: fixed lint errors * feat: updated all proto definitions for v1.15 chain upgrade. Added an example for the new GetEipBaseFee request in txfees module * feat: updated all examples to query gas price from the chain instead of using the default value * Feat/sync with master v1.56.2 (#298) * (fix) Applied the fixes for EIP712 JSON unmarshalling to the master branch * fix: update pre-commit/action from v2.0.2 to v3.0.1 to ry to solve the pre-commit validation workflow error * fix: Added configuration in .golangci.yml file to exclude some dirs * fix: updated the oracle stream prices script to send the oracle type always in lowercase * fix: updated the oracle stream prices script to send the oracle type always in lowercase * fix: Added quantization in the functions that convert notional values to chain format * fix/fix_manual_tx_generation (#296) * fix: fixed the manual TX generation and signing to receive the gas price * fix: solve issues in pre-commit workflow caused by using deprecated components * fix: solve issues in pre-commit workflow caused by using deprecated components * feat: updated proto definitions for the chain upgrade v1.15 * (fix) Applied the fixes for EIP712 JSON unmarshalling to the master branch * fix: updated the oracle stream prices script to send the oracle type always in lowercase * fix: updated the oracle stream prices script to send the oracle type always in lowercase * fix: synced go.mod dependecnies with Injective core * fix: fixed lint errors * fix: fixed lint errors * feat: updated all proto definitions for v1.15 chain upgrade. Added an example for the new GetEipBaseFee request in txfees module * feat: updated all examples to query gas price from the chain instead of using the default value * fix: fix function parameter type * feat: updated proto definition to v1.15.0-beta.2 and v1.14.48 for Indexer * fix: update ofac.json file * Improve error messaging and enhance documentation in eip712_cosmos.go (#240) This PR improves error handling and enhances documentation in the eip712_cosmos.go file to provide clearer messages and more detailed explanations. Signed-off-by: Hwangjae Lee <[email protected]> Co-authored-by: Abel Armoa <[email protected]> * fix: fixed array creatin in a unit test (#299) * fix: updated chain version to v1.15 and indexer version to v1.15.6 * fix: removed explicit inclusion of txfees response in the context initialization (not required) --------- Signed-off-by: Hwangjae Lee <[email protected]> Co-authored-by: Hwangjae Lee <[email protected]>
1 parent 836fa87 commit 680fe94

File tree

105 files changed

+7808
-3163
lines changed

Some content is hidden

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

105 files changed

+7808
-3163
lines changed

Makefile

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
all:
22

33
clone-injective-indexer:
4-
git clone https://github.com/InjectiveLabs/injective-indexer.git -b v1.14.1-RC.6 --depth 1 --single-branch
4+
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 v1.14.0 --depth 1 --single-branch
7+
git clone https://github.com/InjectiveLabs/injective-core.git -b v1.15.0 --depth 1 --single-branch
88

99
copy-exchange-client: clone-injective-indexer
1010
rm -rf exchange/*
@@ -92,6 +92,11 @@ copy-chain-types: clone-injective-core
9292
mkdir -p chain/tokenfactory/types && \
9393
cp injective-core/injective-chain/modules/tokenfactory/types/*.pb.go chain/tokenfactory/types && \
9494
cp injective-core/injective-chain/modules/tokenfactory/types/codec.go chain/tokenfactory/types
95+
mkdir -p chain/txfees/types && \
96+
cp injective-core/injective-chain/modules/txfees/types/*.pb.go chain/txfees/types && \
97+
cp injective-core/injective-chain/modules/txfees/types/codec.go chain/txfees/types
98+
mkdir -p chain/txfees/osmosis/types && \
99+
cp injective-core/injective-chain/modules/txfees/osmosis/types/*.pb.go chain/txfees/osmosis/types
95100
mkdir -p chain/wasmx/types && \
96101
cp injective-core/injective-chain/modules/wasmx/types/*.pb.go chain/wasmx/types && \
97102
cp injective-core/injective-chain/modules/wasmx/types/authz.go chain/wasmx/types && \

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Reach out to us at one of the following places!
6060

6161
## License
6262

63-
Copyright © 2020 - 2022 Injective Labs Inc. (https://injectivelabs.org/)
63+
Copyright © 2020 - 2025 Injective Labs Inc. (https://injectivelabs.org/)
6464

6565
<a href="https://drive.google.com/uc?export=view&id=1-fPQRh_D_dnun2yTtSsPW5MypVBOVYJP"><img src="https://drive.google.com/uc?export=view&id=1-fPQRh_D_dnun2yTtSsPW5MypVBOVYJP" style="width: 300px; max-width: 100%; height: auto" />
6666

auth_vote/authz_vote.go

+10-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"fmt"
66
"os"
77

8-
"github.com/InjectiveLabs/sdk-go/client"
98
chainclient "github.com/InjectiveLabs/sdk-go/client/chain"
109
"github.com/InjectiveLabs/sdk-go/client/common"
1110
rpchttp "github.com/cometbft/cometbft/rpc/client/http"
@@ -49,7 +48,6 @@ func main() {
4948
clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient)
5049

5150
txFactory := chainclient.NewTxFactory(clientCtx)
52-
txFactory = txFactory.WithGasPrices(client.DefaultGasPriceWithDenom)
5351
chainClient, err := chainclient.NewChainClient(
5452
clientCtx,
5553
network,
@@ -60,6 +58,11 @@ func main() {
6058
panic(err)
6159
}
6260

61+
gasPrice := chainClient.CurrentChainGasPrice()
62+
// adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted
63+
gasPrice = int64(float64(gasPrice) * 1.1)
64+
chainClient.SetGasPrice(gasPrice)
65+
6366
// note that we use grantee keyring to send the msg on behalf of granter here
6467
// sender, subaccount are from granter
6568
validators := []string{"inj156t3yxd4udv0h9gwagfcmwnmm3quy0npqc7pks", "inj16nd8yqxe9p6ggnrz58qr7dxn5y2834yendward"}
@@ -97,4 +100,9 @@ func main() {
97100

98101
str, _ := json.MarshalIndent(response, "", " ")
99102
fmt.Print(string(str))
103+
104+
gasPrice = chainClient.CurrentChainGasPrice()
105+
// adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted
106+
gasPrice = int64(float64(gasPrice) * 1.1)
107+
chainClient.SetGasPrice(gasPrice)
100108
}

chain/exchange/types/exchange.pb.go

+332-282
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chain/exchange/types/params.go

+14
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ func DefaultParams() Params {
222222
MarginDecreasePriceTimestampThresholdSeconds: 60,
223223
ExchangeAdmins: []string{},
224224
InjAuctionMaxCap: DefaultInjAuctionMaxCap,
225+
FixedGasEnabled: false,
225226
}
226227
}
227228

@@ -299,6 +300,19 @@ func (p Params) Validate() error {
299300
if err := validateAdmins(p.ExchangeAdmins); err != nil {
300301
return fmt.Errorf("ExchangeAdmins is incorrect: %w", err)
301302
}
303+
304+
if err := validateFixedGasFlag(p.FixedGasEnabled); err != nil {
305+
return fmt.Errorf("fixed_gas_enabled is incorrect: %w", err)
306+
}
307+
308+
return nil
309+
}
310+
311+
func validateFixedGasFlag(enabled any) error {
312+
if _, ok := enabled.(bool); !ok {
313+
return fmt.Errorf("invalid parameter type: %T", enabled)
314+
}
315+
302316
return nil
303317
}
304318

chain/exchange/types/query.pb.go

+171-158
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chain/permissions/types/query.pb.go

+42-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chain/tokenfactory/types/tx.pb.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)