Skip to content
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

Faster JSON implementation #172

Merged
merged 2 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![PkgGoDev](https://pkg.go.dev/badge/github.com/unpackdev/solgo)](https://pkg.go.dev/github.com/unpackdev/solgo)
[![Discord](https://img.shields.io/discord/1109929011896909875.svg)](https://discord.gg/PdHVbuTQRX)

# Solidity Parser and Analyzer in Go
# Go Ethereum Solidity Toolkit: Solidity Parser, Analyzer, and Introspector

**SolGo** - a robust tool crafted in Go, designed to dissect and analyze Solidity's source code.

Expand Down Expand Up @@ -75,7 +75,7 @@ Makes no sense to rewrite all of that hard work just to be written in Go. Theref

List of the projects that use SolGo:

- [Inspector](https://github.com/unpackdev/inspector): A tool for downloading, managing and inspecting smart contracts for Ethereum-based chains.
- [Inspector](https://github.com/unpackdev/inspector) - Tool for downloading, managing and inspecting smart contracts for Ethereum-based chains.

If you wish to add your repository to the list, make sure to submit new PR :)

Expand Down
2 changes: 1 addition & 1 deletion abi/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package abi
import (
"bytes"
"context"
"encoding/json"
"github.com/goccy/go-json"

"github.com/ethereum/go-ethereum/accounts/abi"
abi_pb "github.com/unpackdev/protos/dist/go/abi"
Expand Down
2 changes: 1 addition & 1 deletion abi/method.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package abi

import (
"encoding/json"
"github.com/goccy/go-json"

abi_pb "github.com/unpackdev/protos/dist/go/abi"
"github.com/unpackdev/solgo/utils"
Expand Down
2 changes: 1 addition & 1 deletion ast/and_operation.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/assignment.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"
"reflect"

v3 "github.com/cncf/xds/go/xds/type/v3"
Expand Down
2 changes: 1 addition & 1 deletion ast/binary.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/bit_and_operation.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/bit_or_operator.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/bit_xor_operator.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/body.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"
"reflect"

"github.com/antlr4-go/antlr/v4"
Expand Down
2 changes: 1 addition & 1 deletion ast/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ast
import (
"bytes"
"context"
"encoding/json"
"github.com/goccy/go-json"

ast_pb "github.com/unpackdev/protos/dist/go/ast"
"github.com/unpackdev/solgo"
Expand Down
2 changes: 1 addition & 1 deletion ast/catch.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

ast_pb "github.com/unpackdev/protos/dist/go/ast"
"github.com/unpackdev/solgo/parser"
Expand Down
2 changes: 1 addition & 1 deletion ast/conditional.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/constructor.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

ast_pb "github.com/unpackdev/protos/dist/go/ast"
"github.com/unpackdev/solgo/parser"
Expand Down
2 changes: 1 addition & 1 deletion ast/contract.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ast

import (
"encoding/json"
"fmt"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/do.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/emit.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/enum.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ast

import (
"encoding/json"
"fmt"
"github.com/goccy/go-json"

ast_pb "github.com/unpackdev/protos/dist/go/ast"
"github.com/unpackdev/solgo/parser"
Expand Down
2 changes: 1 addition & 1 deletion ast/expr_operation.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/for.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/function.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ast

import (
"encoding/json"
"fmt"
"github.com/goccy/go-json"
"regexp"
"strings"

Expand Down
2 changes: 1 addition & 1 deletion ast/function_call.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ast

import (
"encoding/json"
"fmt"
"github.com/goccy/go-json"
"regexp"
"strings"

Expand Down
2 changes: 1 addition & 1 deletion ast/if.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/index_access.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ast

import (
"encoding/json"
"fmt"
"github.com/goccy/go-json"
"regexp"
"strings"

Expand Down
2 changes: 1 addition & 1 deletion ast/index_range.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/inline_array.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"
"regexp"
"strings"

Expand Down
2 changes: 1 addition & 1 deletion ast/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
package ast

import (
"encoding/json"
"fmt"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/library.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ast

import (
"encoding/json"
"fmt"
"github.com/goccy/go-json"
"reflect"

v3 "github.com/cncf/xds/go/xds/type/v3"
Expand Down
2 changes: 1 addition & 1 deletion ast/member_access.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ast

import (
"encoding/json"
v3 "github.com/cncf/xds/go/xds/type/v3"
"github.com/goccy/go-json"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
"github.com/unpackdev/solgo/parser"
)
Expand Down
2 changes: 1 addition & 1 deletion ast/modifier.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

ast_pb "github.com/unpackdev/protos/dist/go/ast"
"github.com/unpackdev/solgo/parser"
Expand Down
2 changes: 1 addition & 1 deletion ast/modifier_invocation.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/parameter.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

ast_pb "github.com/unpackdev/protos/dist/go/ast"
"github.com/unpackdev/solgo/parser"
Expand Down
2 changes: 1 addition & 1 deletion ast/parameter_list.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

ast_pb "github.com/unpackdev/protos/dist/go/ast"
"github.com/unpackdev/solgo/parser"
Expand Down
2 changes: 1 addition & 1 deletion ast/payable_conversion.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ast

import (
"encoding/json"
"fmt"
"github.com/goccy/go-json"
"strings"

v3 "github.com/cncf/xds/go/xds/type/v3"
Expand Down
2 changes: 1 addition & 1 deletion ast/receive.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

ast_pb "github.com/unpackdev/protos/dist/go/ast" // Import for AST protocol buffer definitions.
"github.com/unpackdev/solgo/parser" // Import for the solgo parser.
Expand Down
2 changes: 1 addition & 1 deletion ast/return.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/revert.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/root_node.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/shift_operator.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
2 changes: 1 addition & 1 deletion ast/source_unit.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ast

import (
"encoding/json"
"fmt"
"github.com/goccy/go-json"
"path/filepath"
"regexp"

Expand Down
2 changes: 1 addition & 1 deletion ast/struct.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ast

import (
"encoding/json"
"fmt"
"github.com/goccy/go-json"

ast_pb "github.com/unpackdev/protos/dist/go/ast"
"github.com/unpackdev/solgo/parser"
Expand Down
2 changes: 1 addition & 1 deletion ast/try.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ast

import (
"encoding/json"
"github.com/goccy/go-json"

v3 "github.com/cncf/xds/go/xds/type/v3"
ast_pb "github.com/unpackdev/protos/dist/go/ast"
Expand Down
Loading
Loading