hedera-sdk-rust icon indicating copy to clipboard operation
hedera-sdk-rust copied to clipboard

Support Arbitrary Shards & Realms

Open RickyLB opened this issue 10 months ago • 0 comments

Description

The SDKs must support non-zero realm numbers in entity IDs (such as 0.100.0) since Spheres will populate realm values.

We need to validate the SDKs support the following:

  • Specifying a realm number during entity ID construction
  • Using entity IDs with specified realm numbers in transactions
  • Eliminating code that assumes zero for shards and realms

Updated APIs

Several APIs currently offered by the SDKs do not offer support for setting the shard and realm of an entity even though the protobufs do. This will need to be updated to allow the protobuf values to be filled out.

ContractCreateTransaction

  • i64 shard: The shard in which to create the new contract.
    • ContractCreateTransaction .shard(i64)
    • i64 .shard
  • i64 realm: The realm in which to create the new contract.
    • ContractCreateTransaction .realm(i64)
    • i64 .realm

FileCreateTransaction

  • i64 shard: The shard in which to create the new file.

    • FileCreateTransaction .shard(i64)
    • i64 .shard
  • Int64 realm: The realm in which to create the new file.

    • FileCreateTransaction .realm(i64)
    • i64 .realm

AccountCreateTransaction

  • i64 shard: The shard in which to create the new account.

    • AccountCreateTransaction .shard(i64)
    • i64 .shard
  • i64 realm: The realm in which to create the new account.

    • AccountCreateTransaction .realm(i64)
    • i64 .realm

RickyLB avatar Feb 18 '25 19:02 RickyLB