Skip to content

Commit

Permalink
feat: Remove hedera-protobufs-go dependency and add `hedera-protobu…
Browse files Browse the repository at this point in the history
…fs` as submodule (#1103)

* wip: remove protobuf-go dependency

Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>

* chore: bump grpc versions

Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>

* chore: remove hedera-protobufs submodule

Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>

* chore: change submodule to pull from services

Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>

* chore: exclude pb files from sonar

Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>

* chore: fix sonar config

Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>

* chore: remove unused methods

Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>

---------

Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
  • Loading branch information
0xivanov authored Oct 23, 2024
1 parent 68f542d commit 13aa1c2
Show file tree
Hide file tree
Showing 372 changed files with 53,228 additions and 1,291 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "services"]
path = services
url = https://github.com/hashgraph/hedera-services
5 changes: 2 additions & 3 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
sonar.sources=.
sonar.exclusions=**/*_test.go
sonar.exclusions=**/*_test.go,**/*pb.go,**/*.pb

sonar.tests=.
sonar.test.inclusions=**/*_test.go

sonar.cpd.exclusions=**/*_test.go
sonar.cpd.exclusions=examples/**/main.go
sonar.cpd.exclusions=**/*_test.go,examples/**/main.go
2 changes: 1 addition & 1 deletion account_allowance_adjust_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package hedera
import (
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
)

// Deprecated
Expand Down
2 changes: 1 addition & 1 deletion account_allowance_approve_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package hedera
import (
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
)

// AccountAllowanceApproveTransaction
Expand Down
2 changes: 1 addition & 1 deletion account_allowance_approve_transaction_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ package hedera
import (
"testing"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/types/known/wrapperspb"
)
Expand Down
2 changes: 1 addition & 1 deletion account_allowance_delete_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package hedera
import (
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
)

// AccountAllowanceDeleteTransaction
Expand Down
7 changes: 4 additions & 3 deletions account_allowance_delete_transaction_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
package hedera

import (
"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/stretchr/testify/require"
protobuf "google.golang.org/protobuf/proto"
"testing"
"time"

"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
"github.com/stretchr/testify/require"
protobuf "google.golang.org/protobuf/proto"
)

func TestUnitAccountAllowanceDeleteTransactionCoverage(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion account_balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package hedera
*/

import (
"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
)

type AccountBalance struct {
Expand Down
2 changes: 1 addition & 1 deletion account_balance_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package hedera
import (
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
)

// AccountBalanceQuery gets the balance of a CryptoCurrency account. This returns only the balance, so it is a smaller
Expand Down
2 changes: 1 addition & 1 deletion account_balance_query_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"testing"
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"

"github.com/stretchr/testify/assert"

Expand Down
2 changes: 1 addition & 1 deletion account_create_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"strings"
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
)

// AccountCreateTransaction creates a new account. After the account is created, the AccountID for it is in the receipt,
Expand Down
2 changes: 1 addition & 1 deletion account_create_transaction_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"testing"
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

Expand Down
2 changes: 1 addition & 1 deletion account_delete_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package hedera
import (
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
)

// AccountDeleteTransaction
Expand Down
2 changes: 1 addition & 1 deletion account_delete_transaction_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"testing"
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
"github.com/stretchr/testify/assert"
protobuf "google.golang.org/protobuf/proto"

Expand Down
2 changes: 1 addition & 1 deletion account_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

"github.com/pkg/errors"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
protobuf "google.golang.org/protobuf/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion account_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package hedera
import (
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
protobuf "google.golang.org/protobuf/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion account_info_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package hedera
import (
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
)

// AccountInfoQuery
Expand Down
2 changes: 1 addition & 1 deletion account_info_query_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"testing"
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion account_records_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package hedera
import (
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
)

// AccountRecordsQuery gets all of the records for an account for any transfers into it and out of
Expand Down
2 changes: 1 addition & 1 deletion account_records_query_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"testing"
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"

"github.com/stretchr/testify/assert"

Expand Down
2 changes: 1 addition & 1 deletion account_stakers_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package hedera
import (
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
)

// AccountStakersQuery gets all of the accounts that are proxy staking to this account. For each of them, the amount
Expand Down
2 changes: 1 addition & 1 deletion account_stakers_query_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"testing"
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"

"github.com/stretchr/testify/assert"

Expand Down
2 changes: 1 addition & 1 deletion account_update_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

"google.golang.org/protobuf/types/known/wrapperspb"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
)

// AccountUpdateTransaction
Expand Down
2 changes: 1 addition & 1 deletion account_update_transaction_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"testing"
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
protobuf "google.golang.org/protobuf/proto"

"github.com/stretchr/testify/assert"
Expand Down
4 changes: 2 additions & 2 deletions address_book_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"math"
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"

"github.com/hashgraph/hedera-protobufs-go/mirror"
"github.com/hashgraph/hedera-sdk-go/v2/proto/mirror"
"google.golang.org/grpc/status"
)

Expand Down
2 changes: 1 addition & 1 deletion assessed_custom_fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package hedera
import (
"fmt"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
protobuf "google.golang.org/protobuf/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package hedera
*/

import (
"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
"google.golang.org/grpc"
)

Expand Down
2 changes: 1 addition & 1 deletion contract_bytecode_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package hedera
import (
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
)

// ContractBytecodeQuery retrieves the bytecode for a smart contract instance
Expand Down
2 changes: 1 addition & 1 deletion contract_bytecode_query_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"testing"
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"

"github.com/stretchr/testify/assert"

Expand Down
2 changes: 1 addition & 1 deletion contract_call_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package hedera
import (
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
)

// ContractCallQuery calls a function of the given smart contract instance, giving it ContractFunctionParameters as its
Expand Down
2 changes: 1 addition & 1 deletion contract_call_query_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"bytes"
"testing"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
"google.golang.org/protobuf/types/known/wrapperspb"

"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion contract_create_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package hedera
import (
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
)

// ContractCreateTransaction which is used to start a new smart contract instance.
Expand Down
2 changes: 1 addition & 1 deletion contract_create_transaction_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"testing"
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
protobuf "google.golang.org/protobuf/proto"

"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion contract_delete_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package hedera
*/

import (
"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"

"time"
)
Expand Down
2 changes: 1 addition & 1 deletion contract_delete_transaction_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"testing"
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
protobuf "google.golang.org/protobuf/proto"

"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion contract_execute_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package hedera
*/

import (
"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"

"time"
)
Expand Down
2 changes: 1 addition & 1 deletion contract_execute_transaction_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"testing"
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
protobuf "google.golang.org/protobuf/proto"

"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion contract_function_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common/math"
"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
protobuf "google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/wrapperspb"
)
Expand Down
2 changes: 1 addition & 1 deletion contract_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"strconv"
"strings"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
"github.com/pkg/errors"
protobuf "google.golang.org/protobuf/proto"
)
Expand Down
2 changes: 1 addition & 1 deletion contract_id_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"fmt"
"testing"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion contract_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package hedera
import (
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
protobuf "google.golang.org/protobuf/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion contract_info_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package hedera
import (
"time"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
)

// ContractInfoQuery retrieves information about a smart contract instance. This includes the account that it uses, the
Expand Down
2 changes: 1 addition & 1 deletion contract_info_query_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (

protobuf "google.golang.org/protobuf/proto"

"github.com/hashgraph/hedera-protobufs-go/services"
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
"github.com/stretchr/testify/require"
)

Expand Down
Loading

0 comments on commit 13aa1c2

Please sign in to comment.