Skip to content

Commit

Permalink
Nonce too low issues fix (#75)
Browse files Browse the repository at this point in the history
* Serial nonce update (#74)

* feat: prepare txns before routines

* fix: remove forcedNonce feature

* feat: uts

* fix: lint

* lint fix

---------

Co-authored-by: Goran Rojovic <[email protected]>
Co-authored-by: Goran Rojovic <[email protected]>
  • Loading branch information
3 people authored Oct 2, 2024
1 parent 61c38f1 commit 3e27a39
Show file tree
Hide file tree
Showing 13 changed files with 1,846 additions and 263 deletions.
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ run:
timeout: 5m
skip-dirs:
- test

- mocks

linters:
enable:
- whitespace # Tool for detection of leading and trailing whitespace
Expand Down
17 changes: 17 additions & 0 deletions .mockery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
with-expecter: true
dir: "mocks"
filename: "{{.InterfaceName | lower }}.generated.go"
mockname: "{{.InterfaceName}}"
outpkg: "mocks"
packages:
github.com/0xPolygon/zkevm-ethtx-manager/ethtxmanager:
interfaces:
EthermanInterface:
config:
StorageInterface:
config:
dir: "{{.InterfaceDir}}"
filename: "{{.InterfaceName | lower }}.generated.go"
mockname: "{{.InterfaceName}}Mock"
outpkg: "{{.PackageName}}"
inpackage: True
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ check-go:
check-curl:
@which curl > /dev/null || (echo "Error: curl is not installed" && exit 1)

.PHONY: check-mockery
check-mockery:
@which mockery > /dev/null || (echo "Error: mockery is not installed" && exit 1)

# Targets that require the checks
build: check-go
lint: check-go
Expand All @@ -41,6 +45,10 @@ lint: ## Runs the linter
test-unit:
trap '$(STOP)' EXIT; MallocNanoZone=0 go test -count=1 -short -race -p 1 -covermode=atomic -coverprofile=coverage.out -coverpkg ./... -timeout 200s ./...

.PHONY: generate-mocks
generate-mocks: ## Generates mocks and other autogenerated types
mockery

## Help display.
## Pulls comments from beside commands and prints a nicely formatted
## display with the commands and their usage information.
Expand Down
Loading

0 comments on commit 3e27a39

Please sign in to comment.