Skip to content

Commit e690aff

Browse files
authored
Merge pull request #3 from NibiruChain/mat/delegate-call-readonly
vm: allow delegate calls to modify state in precompiled contracts
2 parents e5eb32a + 24f8452 commit e690aff

File tree

417 files changed

+3777
-3372
lines changed

Some content is hidden

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

417 files changed

+3777
-3372
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
7+
jobs:
8+
cleanup-runs:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: rokroskar/workflow-run-cleanup-action@master
12+
env:
13+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
14+
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"
15+
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- uses: actions/setup-go@v3
21+
with:
22+
go-version: 1.19
23+
check-latest: true
24+
- uses: technote-space/[email protected]
25+
id: git_diff
26+
with:
27+
PATTERNS: |
28+
**/**.go
29+
go.mod
30+
go.sum
31+
- run: |
32+
make build
33+
if: env.GIT_DIFF

.github/workflows/dependencies.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "Dependency Review"
2+
on: pull_request
3+
4+
permissions:
5+
contents: read
6+
7+
jobs:
8+
dependency-review:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/setup-go@v3
12+
with:
13+
go-version: 1.19
14+
check-latest: true
15+
- name: "Checkout Repository"
16+
uses: actions/checkout@v3
17+
- uses: technote-space/[email protected]
18+
with:
19+
PATTERNS: |
20+
**/**.go
21+
go.mod
22+
go.sum
23+
- name: "Dependency Review"
24+
uses: actions/dependency-review-action@v3
25+
if: env.GIT_DIFF
26+
- name: "Go vulnerability check"
27+
run: make vulncheck
28+
if: env.GIT_DIFF

.github/workflows/lint.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Lint
2+
# Lint runs golangci-lint over the entire ethermint repository This workflow is
3+
# run on every pull request and push to main The `golangci` will pass without
4+
# running if no *.{go, mod, sum} files have been changed.
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- master
10+
jobs:
11+
golangci:
12+
name: Run golangci-lint
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 10
15+
steps:
16+
# Required: setup-go, for all versions v3.0.0+ of golangci-lint
17+
- uses: actions/setup-go@v3
18+
with:
19+
go-version: 1.19
20+
check-latest: true
21+
- uses: actions/checkout@v3
22+
- uses: technote-space/[email protected]
23+
with:
24+
PATTERNS: |
25+
**/**.go
26+
go.mod
27+
go.sum
28+
- uses: golangci/[email protected]
29+
with:
30+
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
31+
version: latest
32+
args: --timeout 10m
33+
github-token: ${{ secrets.github_token }}
34+
# Check only if there are differences in the source code
35+
if: env.GIT_DIFF
36+
markdown-lint:
37+
name: Run markdown-lint
38+
runs-on: ubuntu-latest
39+
timeout-minutes: 10
40+
steps:
41+
- uses: actions/checkout@v3
42+
- uses: technote-space/[email protected]
43+
with:
44+
PATTERNS: |
45+
docs/**/*.md
46+
x/**/*.md
47+
README.md
48+
- uses: nosborn/[email protected]
49+
with:
50+
files: .
51+
config_file: .markdownlint.yml
52+
ignore_path: .markdownlintignore
53+
# Check only if there are differences in the source code
54+
if: env.GIT_DIFF
55+
gomod2nix:
56+
name: Check gomod2nix.toml file is up to date
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: actions/[email protected]
60+
- uses: cachix/install-nix-action@v18
61+
- uses: cachix/cachix-action@v12
62+
with:
63+
name: ethermint
64+
- uses: technote-space/[email protected]
65+
with:
66+
PATTERNS: |
67+
**/**.py
68+
- name: run gomod2nix
69+
run: |
70+
nix run -f ./nix gomod2nix
71+
git diff --no-ext-diff --exit-code
72+
if: env.GIT_DIFF
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Check Markdown links
2+
on:
3+
pull_request:
4+
paths:
5+
- '**.md'
6+
push:
7+
branches:
8+
- master
9+
paths:
10+
- '**.md'
11+
12+
jobs:
13+
markdown-link-check:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: technote-space/[email protected]
18+
id: git_diff
19+
with:
20+
PATTERNS: |
21+
**/**.md
22+
- uses: gaurav-nelson/github-action-markdown-link-check@master
23+
with:
24+
folder-path: "docs"
25+
check-modified-files-only: "yes"
26+
use-quiet-mode: "yes"
27+
base-branch: "main"
28+
config-file: "mlc_config.json"
29+
if: env.GIT_DIFF

.github/workflows/security.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Run Gosec
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
Gosec:
10+
permissions:
11+
security-events: write
12+
13+
runs-on: ubuntu-latest
14+
env:
15+
GO111MODULE: on
16+
steps:
17+
- name: Checkout Source
18+
uses: actions/checkout@v3
19+
- name: Get Diff
20+
uses: technote-space/[email protected]
21+
with:
22+
PATTERNS: |
23+
**/*.go
24+
go.mod
25+
go.sum
26+
- name: Run Gosec Security Scanner
27+
uses: cosmos/gosec@master
28+
with:
29+
# we let the report trigger content trigger a failure using the GitHub Security features.
30+
args: "-no-fail -fmt sarif -out results.sarif ./..."
31+
if: "env.GIT_DIFF_FILTERED != ''"
32+
- name: Upload SARIF file
33+
uses: github/codeql-action/upload-sarif@v2
34+
with:
35+
# Path to SARIF file relative to the root of the repository
36+
sarif_file: results.sarif
37+
if: "env.GIT_DIFF_FILTERED != ''"

.github/workflows/super-linter.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This workflow executes several linters on changed files based on languages used in your code base whenever
2+
# you push a code or open a pull request.
3+
#
4+
# You can adjust the behavior by modifying this file.
5+
# For more information, see:
6+
# https://github.com/github/super-linter
7+
---
8+
name: Lint Code Base
9+
10+
on:
11+
push:
12+
branches: ["master"]
13+
pull_request:
14+
branches: ["master"]
15+
jobs:
16+
run-lint:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v3
21+
with:
22+
# Full git history is needed to get a proper list of changed files within `super-linter`
23+
fetch-depth: 0
24+
25+
- name: Lint Code Base
26+
uses: github/super-linter@v4
27+
env:
28+
LINTER_RULES_PATH: /
29+
YAML_CONFIG_FILE: .yamllint
30+
VALIDATE_ALL_CODEBASE: false
31+
MARKDOWN_CONFIG_FILE: .markdownlint.yml
32+
PROTOBUF_CONFIG_FILE: .protolint.yml
33+
VALIDATE_NATURAL_LANGUAGE: false
34+
VALIDATE_OPENAPI: false
35+
VALIDATE_JSCPD: false
36+
VALIDATE_GO: false
37+
DEFAULT_BRANCH: "master"
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Tests
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
- release/**
8+
9+
jobs:
10+
cleanup-runs:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: rokroskar/workflow-run-cleanup-action@master
14+
env:
15+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
16+
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"
17+
18+
test-all:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/setup-go@v3
22+
with:
23+
go-version: 1.19
24+
check-latest: true
25+
- uses: actions/checkout@v3
26+
- uses: technote-space/[email protected]
27+
with:
28+
PATTERNS: |
29+
**/**.go
30+
go.mod
31+
go.sum
32+
- name: Test and Create Coverage Report
33+
run: |
34+
make test all
35+
if: env.GIT_DIFF

.markdownlint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"default": true
2+
"MD001": false
3+
"MD004": false
4+
"MD007":
5+
"indent": 4
6+
"MD013": false
7+
"MD024":
8+
"siblings_only": true
9+
"MD025": false
10+
"MD026":
11+
"punctuation": ".;:"
12+
"MD029": false
13+
"MD033": false
14+
"MD034": false
15+
"MD036": false
16+
"MD040": false
17+
"MD041": false
18+
"MD051": false
19+
"MD049":
20+
"style": "asterisk"
21+
"no-hard-tabs": false

.markdownlintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CHANGELOG.md
2+
docs/*
3+

0 commit comments

Comments
 (0)