forked from 0xPolygon/zkevm-ethtx-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge dev
into upstream v0.2.1
#8
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c051c96
option to avoid gas estimationi
arnaubennassar 6e08784
Merge pull request #55 from 0xPolygonHermez/feature/avoid-gas-estimation
arnaubennassar 0813aff
Quality Gate (#61)
goran-ethernal c482f9a
ensure tx order (#64)
ToniRamirezM 4af559b
change namespace (#65)
ToniRamirezM 61c38f1
fix nonce too low (#67)
ToniRamirezM 3e27a39
Nonce too low issues fix (#75)
Stefan-Ethernal ec887ce
feat: implement SQL lite storage (#72)
Stefan-Ethernal f1286e9
Rename config parameter `DBPath` to `StoragePath` (#77)
Stefan-Ethernal 1b8de9d
fix if a tx is finalized very fast (#84)
ARR552 4da7722
# This is a combination of 3 commits.
Vui-Chee 700f184
parent 4da772263e737526d5b2c7cb4b726685064b5732
Vui-Chee 9adc3e2
Merge branch 'dev' into vui-chee/base-dev-v0.2.1
Vui-Chee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
name: Test unit | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- 'release/**' | ||
pull_request: | ||
|
||
jobs: | ||
test-unit: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
go-version: [ 1.21.x ] | ||
goarch: [ "amd64" ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
env: | ||
GOARCH: ${{ matrix.goarch }} | ||
|
||
- name: Test | ||
run: make test-unit | ||
|
||
- name: Archive code coverage results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: code-coverage-report | ||
path: coverage.out | ||
|
||
sonar-cloud: | ||
if: false | ||
needs: test-unit | ||
name: SonarCloud | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
- name: Download code coverage results | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: code-coverage-report | ||
|
||
- name: Analyze with SonarCloud | ||
uses: sonarsource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
test/sepolia.keystore | ||
test/ethtxmanager-persistence.json | ||
test/ethtxmanager-persistence.json.tmp | ||
coverage.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
with-expecter: true | ||
dir: "mocks" | ||
filename: "{{.InterfaceName | lower }}.generated.go" | ||
mockname: "{{.InterfaceName}}" | ||
outpkg: "mocks" | ||
packages: | ||
github.com/0xPolygon/zkevm-ethtx-manager/types: | ||
interfaces: | ||
EthermanInterface: | ||
config: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added by v0.2.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package common | ||
|
||
import "github.com/ethereum/go-ethereum/common" | ||
|
||
const ( | ||
// Base10 decimal base | ||
Base10 = 10 | ||
// Gwei represents 1000000000 wei | ||
Gwei = 1000000000 | ||
|
||
// SQLLiteDriverName is the name for the SQL lite driver | ||
SQLLiteDriverName = "sqlite3" | ||
) | ||
|
||
// ToAddressPtr converts a string to a common.Address pointer or returns nil if empty. | ||
func ToAddressPtr(addr string) *common.Address { | ||
if addr == "" { | ||
return nil | ||
} | ||
|
||
address := common.HexToAddress(addr) | ||
return &address | ||
} | ||
|
||
// ToUint64Ptr is a helper to create uint64 pointer | ||
func ToUint64Ptr(v uint64) *uint64 { | ||
return &v | ||
} | ||
|
||
// SlicePtrsToSlice converts a slice of pointers to a slice of values. | ||
func SlicePtrsToSlice[T any](ptrSlice []*T) []T { | ||
// Create a new slice to hold the values | ||
res := make([]T, len(ptrSlice)) | ||
// Dereference each pointer and add the value to the result slice | ||
for i, ptr := range ptrSlice { | ||
if ptr != nil { | ||
res[i] = *ptr | ||
} | ||
} | ||
return res | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added by v0.2.1
0xPolygon/zkevm-ethtx-manager
.