Skip to content

Commit bb4b78d

Browse files
imp(all): Move latest changes from Evmos main (incl. SDK v50) (#48)
1 parent d22f510 commit bb4b78d

File tree

486 files changed

+83667
-18044
lines changed

Some content is hidden

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

486 files changed

+83667
-18044
lines changed

.github/workflows/auto-format.yml

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,42 @@ on:
66
permissions: read-all
77

88
jobs:
9-
format-go-code:
9+
format-code:
1010
runs-on: ubuntu-latest
1111

1212
permissions:
1313
contents: write
1414

1515
steps:
16-
- uses: actions/setup-go@v5
17-
with:
18-
go-version: "1.22"
19-
check-latest: true
16+
# Checkout repository
2017
- uses: actions/checkout@v4
2118
with:
2219
token: ${{ secrets.E2E_PAT }}
23-
- run: go install mvdan.cc/gofumpt@latest
24-
- run: make format
25-
# Commit formatted files if necessary
26-
- uses: stefanzweifel/git-auto-commit-action@v5
27-
with:
28-
commit_message: run make format
2920

30-
format-python-code:
31-
runs-on: ubuntu-latest
32-
33-
permissions:
34-
contents: write
21+
# Install shell formatter
22+
- run: sudo apt-get install -y shfmt
3523

36-
steps:
37-
- uses: actions/checkout@v4
24+
# Set up Go
25+
- uses: actions/setup-go@v5
3826
with:
39-
token: ${{ secrets.E2E_PAT }}
27+
go-version: "1.22"
28+
check-latest: true
29+
30+
# Install Go formatter
31+
- run: go install mvdan.cc/gofumpt@latest
32+
33+
# Set up Python
4034
- uses: actions/setup-python@v5
4135
with:
42-
python-version: '3.10'
36+
python-version: "3.10"
37+
38+
# Install Python formatters
4339
- run: pip install black isort
44-
- run: make format-python
40+
41+
# Run the combined format command
42+
- run: make format
43+
4544
# Commit formatted files if necessary
4645
- uses: stefanzweifel/git-auto-commit-action@v5
4746
with:
48-
commit_message: run make format-python
47+
commit_message: run make format

.github/workflows/bsr-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16-
- uses: bufbuild/buf-setup-action@v1.39.0
16+
- uses: bufbuild/buf-setup-action@v1.41.0
1717
# Push evmOS protos to the Buf Schema Registry
1818
- uses: bufbuild/[email protected]
1919
with:

.github/workflows/proto.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
timeout-minutes: 5
3333
steps:
3434
- uses: actions/checkout@v4
35-
- uses: bufbuild/buf-setup-action@v1.39.0
35+
- uses: bufbuild/buf-setup-action@v1.41.0
3636
- uses: bufbuild/buf-lint-action@v1
3737
with:
3838
input: "proto"
@@ -41,7 +41,7 @@ jobs:
4141
runs-on: ubuntu-latest
4242
steps:
4343
- uses: actions/checkout@v4
44-
- uses: bufbuild/buf-setup-action@v1.39.0
44+
- uses: bufbuild/buf-setup-action@v1.41.0
4545
- uses: bufbuild/buf-breaking-action@v1
4646
with:
4747
input: "proto"

.github/workflows/super-linter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
VALIDATE_OPENAPI: false
3333
VALIDATE_JSCPD: false
3434
VALIDATE_GO: false
35+
VALIDATE_GO_MODULES: false
3536
PYTHON_PYLINT_CONFIG_FILE: .pylintrc
3637
DEFAULT_BRANCH: "main"
3738
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ yarn.lock
2828

2929
# OpenZeppelin contracts
3030
contracts/@openzeppelin/*
31+
32+
# Build files
33+
example_chain/build/

.gitleaks.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ description = "global allow lists"
1515
paths = [
1616
'''gitleaks.toml''',
1717
'''(.*?)(jpg|gif|pdf|png|svg)$''',
18-
'''(go.mod|go.sum)$''',
18+
'''(go.mod|go.sum|go.work|go.work.sum)$''',
1919
]
2020
stopwords = [
2121
'''secp256k1''',
2222
'''evmospub1addwnpepqgcxazmq6wgt2j4rdfumsfwla0zfk8e5sws3p3zg5dkm9007hmfysxas0u2''',
23+
'''0x8FA78CEB7F04118Ec6d06AaC37Ca854691d8e963''',
24+
'''0x205CF44075E77A3543abC690437F3b2819bc450a''',
25+
'''evmos10d07y265gmmuvt4z0w9aw880jnsr700jcrztvm''',
2326
]
2427

2528
[[rules]]

.pylintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
# --disable=W".
1212
disable=raw-checker-failed,
1313
bad-inline-option,
14+
broad-exception-caught,
15+
consider-using-f-string,
1416
locally-disabled,
1517
file-ignored,
1618
suppressed-message,
@@ -25,6 +27,7 @@ disable=raw-checker-failed,
2527
too-few-public-methods,
2628
too-many-public-methods,
2729
too-many-arguments,
30+
too-many-instance-attributes,
2831
too-many-lines,
2932
too-many-locals,
3033
too-many-branches,
@@ -36,3 +39,5 @@ disable=raw-checker-failed,
3639
import-error,
3740
use-dict-literal,
3841
fixme
42+
43+
max-line-length=120

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This changelog was created using the `clu` binary
88

99
### Improvements
1010

11+
- (all) [#48](https://github.com/evmos/os/pull/48) Move latest changes from evmOS main (f943af3b incl. SDK v50).
1112
- (all) [#43](https://github.com/evmos/os/pull/43) Update with latest evmOS main changes (2b7a8e2).
1213
- (tests) [#41](https://github.com/evmos/os/pull/41) Add Solidity and Ledger tests.
1314
- (all) [#37](https://github.com/evmos/os/pull/37) Add EVM, feemarket and precompiles from evmOS.

Makefile

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export GO111MODULE = on
1111
# Default target executed when no arguments are given to make.
1212
default_target: all
1313

14-
.PHONY: default_target
14+
.PHONY: build, default_target
1515

1616
###############################################################################
1717
### Tools & Dependencies ###
@@ -78,26 +78,31 @@ benchmark:
7878
### Linting ###
7979
###############################################################################
8080

81-
lint:
81+
lint: lint-go lint-python lint-contracts
82+
83+
lint-go:
84+
gofumpt -l .
8285
golangci-lint run --out-format=tab
86+
87+
lint-python:
88+
find . -name "*.py" -type f -not -path "*/node_modules/*" | xargs pylint
89+
flake8
90+
91+
lint-contracts:
8392
solhint contracts/**/*.sol
8493

8594
lint-fix:
8695
golangci-lint run --fix --out-format=tab --issues-exit-code=0
8796

8897
lint-fix-contracts:
89-
@cd contracts && \
90-
npm i && \
91-
npm run lint-fix
9298
solhint --fix contracts/**/*.sol
9399

94-
.PHONY: lint lint-fix
100+
.PHONY: lint lint-fix lint-contracts lint-go lint-python
95101

96-
format:
97-
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -name '*.pb.go' -not -name '*.pb.gw.go' | xargs gofumpt -w -l
98-
99-
.PHONY: format
102+
format: format-go format-python format-shell
100103

104+
format-go:
105+
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -name '*.pb.go' -not -name '*.pb.gw.go' -not -name '*.pulsar.go' | xargs gofumpt -w -l
101106

102107
format-python: format-isort format-black
103108

@@ -107,11 +112,16 @@ format-black:
107112
format-isort:
108113
find . -name '*.py' -type f -not -path "*/node_modules/*" | xargs isort
109114

115+
format-shell:
116+
shfmt -l -w .
117+
118+
.PHONY: format format-go format-python format-black format-isort format-go
119+
110120
###############################################################################
111121
### Protobuf ###
112122
###############################################################################
113123

114-
protoVer=0.11.6
124+
protoVer=0.14.0
115125
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
116126
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace --user 0 $(protoImageName)
117127

@@ -128,6 +138,7 @@ proto-all: proto-format proto-lint proto-gen
128138
proto-gen:
129139
@echo "generating implementations from Protobuf files"
130140
@$(protoImage) sh ./scripts/generate_protos.sh
141+
@$(protoImage) sh ./scripts/generate_protos_pulsar.sh
131142

132143
proto-format:
133144
@echo "formatting Protobuf files"

ante/cosmos/authz.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func NewAuthzLimiterDecorator(disabledMsgTypes ...string) AuthzLimiterDecorator
3131

3232
func (ald AuthzLimiterDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) {
3333
if err := ald.checkDisabledMsgs(tx.GetMsgs(), false, 1); err != nil {
34-
return ctx, errorsmod.Wrap(errortypes.ErrUnauthorized, err.Error())
34+
return ctx, errorsmod.Wrapf(errortypes.ErrUnauthorized, "%s", err.Error())
3535
}
3636
return next(ctx, tx, simulate)
3737
}

0 commit comments

Comments
 (0)