Skip to content

Commit 6d96162

Browse files
authored
Merge branch 'main' into feat/1778-contract-max-auto-associations-tests
2 parents d420d12 + 0aa2d97 commit 6d96162

27 files changed

Lines changed: 1030 additions & 120 deletions

.github/workflows/build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
sudo apt-get install -y --no-install-recommends gcc libc6-dev libc-dev
4343
4444
- name: Set up Go ${{ env.GO_VERSION }}
45-
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
45+
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
4646
with:
4747
go-version: ${{ env.GO_VERSION }}
4848
id: go
@@ -92,7 +92,7 @@ jobs:
9292
sudo apt-get install -y --no-install-recommends gcc libc6-dev libc-dev
9393
9494
- name: Set up Go ${{ env.GO_VERSION }}
95-
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
95+
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
9696
with:
9797
go-version: ${{ env.GO_VERSION }}
9898
id: go
@@ -103,7 +103,7 @@ jobs:
103103
- name: Prepare Hiero Solo
104104
if: success() && matrix.test-type == 'e2e'
105105
id: solo
106-
uses: hiero-ledger/hiero-solo-action@328bc84c3b00a990a151418144fd682a4eb76ea6 # v0.19.0
106+
uses: hiero-ledger/hiero-solo-action@531a2b283ca4912df537d64bf89da0f6be4c2574 # v0.22.0
107107
with:
108108
installMirrorNode: true
109109
hieroVersion: ${{ env.HIERO_VERSION }}
@@ -163,7 +163,7 @@ jobs:
163163
sudo apt-get install -y --no-install-recommends gcc libc6-dev libc-dev
164164
165165
- name: Set up Go ${{ env.GO_VERSION }}
166-
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
166+
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
167167
with:
168168
go-version: ${{ env.GO_VERSION }}
169169
id: go
@@ -173,7 +173,7 @@ jobs:
173173

174174
- name: Prepare Hiero Solo
175175
id: solo
176-
uses: hiero-ledger/hiero-solo-action@328bc84c3b00a990a151418144fd682a4eb76ea6 # v0.19.0
176+
uses: hiero-ledger/hiero-solo-action@531a2b283ca4912df537d64bf89da0f6be4c2574 # v0.22.0
177177
with:
178178
installMirrorNode: true
179179
hieroVersion: ${{ env.HIERO_VERSION }}
@@ -221,7 +221,7 @@ jobs:
221221
sudo apt-get install -y --no-install-recommends gcc libc6-dev libc-dev
222222
223223
- name: Set up Go ${{ env.GO_VERSION }}
224-
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
224+
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
225225
with:
226226
go-version: ${{ env.GO_VERSION }}
227227
id: go
@@ -234,7 +234,7 @@ jobs:
234234

235235
- name: Prepare Hiero Solo
236236
id: solo
237-
uses: hiero-ledger/hiero-solo-action@328bc84c3b00a990a151418144fd682a4eb76ea6 # v0.19.0
237+
uses: hiero-ledger/hiero-solo-action@531a2b283ca4912df537d64bf89da0f6be4c2574 # v0.22.0
238238
with:
239239
installMirrorNode: true
240240
hieroVersion: ${{ env.HIERO_VERSION }}
@@ -265,7 +265,7 @@ jobs:
265265
sudo apt-get install -y --no-install-recommends gcc libc6-dev libc-dev
266266
267267
- name: Set up Go ${{ env.GO_VERSION }}
268-
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
268+
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
269269
with:
270270
go-version: ${{ env.GO_VERSION }}
271271
id: go

examples/generate_key_with_mnemonic/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func main() {
1919
fmt.Printf("Generated 24-word mnemonic: %v\n", mnemonic24)
2020

2121
fmt.Println("Recovering an ECDSA private key from the 24-word mnemonic phrase above...")
22-
privateKey24, err := mnemonic24.ToStandardECDSAsecp256k1PrivateKey( /* passphrase */ "", /* index */ 0)
22+
privateKey24, err := mnemonic24.ToStandardECDSAsecp256k1PrivateKey( /* passphrase */ "" /* index */, 0)
2323
if err != nil {
2424
panic(fmt.Sprintf("%v : error converting 24 word mnemonic to PrivateKey", err))
2525
}
@@ -39,7 +39,7 @@ func main() {
3939
fmt.Printf("Generated 12-word mnemonic: %v\n", mnemonic12)
4040

4141
fmt.Println("Recovering an ECDSA private key from the 12-word mnemonic phrase above...")
42-
privateKey12, err := mnemonic12.ToStandardECDSAsecp256k1PrivateKey( /* passphrase */ "", /* index */ 0)
42+
privateKey12, err := mnemonic12.ToStandardECDSAsecp256k1PrivateKey( /* passphrase */ "" /* index */, 0)
4343
if err != nil {
4444
panic(fmt.Sprintf("%v : error converting 12 word mnemonic to PrivateKey", err))
4545
}

sdk/account_allowance_approve_transaction_unit_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,4 +368,3 @@ func TestUnitDeleteTokenNftAllowanceAllSerialsAppendsPerCall(t *testing.T) {
368368
require.Equal(t, d.CryptoApproveAllowance.NftAllowances, []*services.NftAllowance{revoke, revoke})
369369
}
370370
}
371-

sdk/account_create_transaction.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ func (tx AccountCreateTransaction) buildScheduled() (*services.SchedulableTransa
417417
body.Data = &services.SchedulableTransactionBody_CryptoCreateAccount{
418418
CryptoCreateAccount: tx.buildProtoBody(),
419419
}
420-
420+
421421
return body, nil
422422
}
423423

sdk/address_book_query_e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func TestIntegrationAddressBookQueryLocal(t *testing.T) {
8686

8787
// Set the network
8888
network := make(map[string]AccountID)
89-
network["localhost:50211"] = AccountID{Account: 3}
89+
network["localhost:35211"] = AccountID{Account: 3}
9090
client, err := ClientForNetworkV2(network)
9191
require.NoError(t, err)
9292
defer client.Close()

sdk/block_node_service_endpoint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (e *BlockNodeServiceEndpoint) SetEndpointApis(apis []BlockNodeApi) *BlockNo
4646

4747
// AddEndpointApi adds a block node API kind to this endpoint.
4848
func (e *BlockNodeServiceEndpoint) AddEndpointApi(api BlockNodeApi) *BlockNodeServiceEndpoint {
49-
e.endpointApis = append(e.endpointApis,api)
49+
e.endpointApis = append(e.endpointApis, api)
5050
return e
5151
}
5252

sdk/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ func ClientForName(name string) (*Client, error) {
253253
return ClientForMainnet(), nil
254254
case "local", "localhost":
255255
network := make(map[string]AccountID)
256-
network["127.0.0.1:50211"] = AccountID{Account: 3}
256+
network["127.0.0.1:35211"] = AccountID{Account: 3}
257257
mirror := []string{"127.0.0.1:5600"}
258258
client, err := ClientForNetworkV2(network)
259259
if err != nil {

sdk/client_unit_test.go

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,19 @@ func TestUnitClientPersistsShardAndRealm(t *testing.T) {
333333
assert.Equal(t, uint64(2), client.GetRealm())
334334
}
335335

336+
func TestUnitClientForNameLocalhost(t *testing.T) {
337+
t.Parallel()
338+
339+
client, err := ClientForName("localhost")
340+
require.NoError(t, err)
341+
defer client.Close()
342+
343+
// The localhost preset targets the Solo local consensus node and mirror gRPC endpoint.
344+
network := client.GetNetwork()
345+
assert.Equal(t, AccountID{Account: 3}, network["127.0.0.1:35211"])
346+
assert.Contains(t, client.GetMirrorNetwork(), "127.0.0.1:5600")
347+
}
348+
336349
func TestUnitClientForNetworkV2(t *testing.T) {
337350
t.Parallel()
338351
network := map[string]AccountID{
@@ -452,9 +465,9 @@ func TestUnitClientGetMirrorRestApiBaseUrlLocalHost(t *testing.T) {
452465
assert.Equal(t, test.expectedScheme, parsedURL.Scheme)
453466

454467
if test.domain == "localhost:80" {
455-
assert.Equal(t, "localhost:5551", parsedURL.Host)
468+
assert.Equal(t, "localhost:38081", parsedURL.Host)
456469
} else {
457-
assert.Equal(t, "127.0.0.1:5551", parsedURL.Host)
470+
assert.Equal(t, "127.0.0.1:38081", parsedURL.Host)
458471
}
459472

460473
assert.Equal(t, "/api/v1", parsedURL.Path)

sdk/errors.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ var errNodeIdIsRequired = errors.New("nodeID is required")
3838
var errEvmAddressIsNotALongZeroAddress = errors.New("EVM address is not a correct long zero address")
3939
var errEvmAddressIsNotCorrectSize = errors.New("EVM address is not the correct size")
4040
var errInvalidChunkSize = errors.New("chunk size must be greater than 0")
41+
var errPublicKeyHasNotSigned = errors.New("the public key has not signed this transaction")
4142

4243
// Endpoint validation errors
4344
var errEndpointMustHaveAddressOrDomainName = errors.New("endpoint must have either address or domain name")

sdk/hook_creation_details.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const (
1616
type HookCreationDetails struct {
1717
extensionPoint HookExtensionPoint
1818
hookId int64
19-
evmHook EvmHook
19+
evmHook EvmHook
2020
adminKey Key
2121
}
2222

@@ -77,7 +77,7 @@ func hookCreationDetailsFromProtobuf(pb *services.HookCreationDetails) HookCreat
7777
return HookCreationDetails{
7878
extensionPoint: HookExtensionPoint(pb.GetExtensionPoint()),
7979
hookId: pb.GetHookId(),
80-
evmHook: evmHookFromProtobuf(pb.GetEvmHook()),
80+
evmHook: evmHookFromProtobuf(pb.GetEvmHook()),
8181
adminKey: key,
8282
}
8383
}

0 commit comments

Comments
 (0)