Skip to content

Commit

Permalink
code review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkouv committed Jan 23, 2024
1 parent 7de1bb0 commit 7303ed1
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 51 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
cache: false
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
- name: Make sure generated files are updated
run: |
if go generate | grep -q 'no changes detected'; then
exit 0;
fi
exit 1;
- name: Test
run: go test -v ./...
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Any new chains and selectors should be always added to [selectors.yml](selectors
details from this file. This ensures that all client libraries are in sync and use the same mapping.
To add a new chain, please add new entry to the `selectors.yml` file and use the following format:

Make sure to run `go generate` after making any changes.

```yaml
$chain_id:
selector: $chain_selector as uint64
Expand Down
2 changes: 1 addition & 1 deletion genchains.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func genChainsSourceCode() (string, error) {
}

func toVarName(name string, chainSel uint64) string {
const unnamed = "UNNAMED"
const unnamed = "TEST"
x := strings.ReplaceAll(name, "-", "_")
x = strings.ToUpper(x)
if len(x) > 0 && unicode.IsDigit(rune(x[0])) {
Expand Down
96 changes: 48 additions & 48 deletions generated_chains.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7303ed1

Please sign in to comment.