Skip to content

Commit

Permalink
improving a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaveracll committed Nov 8, 2024
1 parent d84f42e commit c0ea797
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion aptos.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func parseAptosYml(ymlFile []byte) map[uint64]ChainDetails {
}

func validateAptosChainID(data map[uint64]ChainDetails) {
// TODO:
// TODO: https://smartcontract-it.atlassian.net/browse/NONEVM-890
}

func AptosChainIdToChainSelector() map[uint64]uint64 {
Expand Down
7 changes: 4 additions & 3 deletions genchains_aptos.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ var chainTemplate, _ = template.New("").Parse(`// Code generated by go generate
package chain_selectors
type AptosChain struct {
ChainID string
ChainID uint64
Selector uint64
Name string
VarName string
}
var (
{{ range . }}
{{.VarName}} = AptosChain{ChainID: "{{ .ChainID }}", Selector: {{ .Selector }}, Name: "{{ .Name }}"}{{ end }}
{{.VarName}} = AptosChain{ChainID: {{ .ChainID }}, Selector: {{ .Selector }}, Name: "{{ .Name }}"}{{ end }}
)
var AptosALL = []AptosChain{
Expand All @@ -64,9 +64,10 @@ func main() {
}

if string(existingContent) == string(formatted) {
fmt.Println("no changes detected")
fmt.Println("aptos: no changes detected")
return
}
fmt.Println("aptos: updating generations")

err = os.WriteFile(filename, formatted, 0644)
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion genchains_evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ func main() {
}

if string(existingContent) == string(formatted) {
fmt.Println("no changes detected")
fmt.Println("evm: no changes detected")
return
}
fmt.Println("evm: updating generations")

err = os.WriteFile(filename, formatted, 0644)
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion genchains_solana.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ func main() {
}

if string(existingContent) == string(formatted) {
fmt.Println("no changes detected")
fmt.Println("solana: no changes detected")
return
}
fmt.Println("evm: updating generations")

err = os.WriteFile(filename, formatted, 0644)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions generated_chains_aptos.go

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

2 changes: 1 addition & 1 deletion generated_chains_solana.go

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

0 comments on commit c0ea797

Please sign in to comment.