@@ -95,7 +95,7 @@ public final class FileId: EntityId {
9595 public static let exchangeRates : FileId = FileId ( num: 112 )
9696
9797 public static func fromBytes( _ bytes: Data ) throws -> Self {
98- try bytes. withUnsafeBytes { ( pointer: UnsafeRawBufferPointer ) in
98+ try bytes. withUnsafeTypedBytes { pointer in
9999 var shard : UInt64 = 0
100100 var realm : UInt64 = 0
101101 var num : UInt64 = 0
@@ -121,7 +121,7 @@ public final class FileId: EntityId {
121121/// The unique identifier for a smart contract on Hedera.
122122public final class ContractId : EntityId {
123123 public static func fromBytes( _ bytes: Data ) throws -> Self {
124- try bytes. withUnsafeBytes { ( pointer: UnsafeRawBufferPointer ) in
124+ try bytes. withUnsafeTypedBytes { pointer in
125125 var shard : UInt64 = 0
126126 var realm : UInt64 = 0
127127 var num : UInt64 = 0
@@ -147,7 +147,7 @@ public final class ContractId: EntityId {
147147/// The unique identifier for a topic on Hedera.
148148public final class TopicId : EntityId {
149149 public static func fromBytes( _ bytes: Data ) throws -> Self {
150- try bytes. withUnsafeBytes { ( pointer: UnsafeRawBufferPointer ) in
150+ try bytes. withUnsafeTypedBytes { pointer in
151151 var shard : UInt64 = 0
152152 var realm : UInt64 = 0
153153 var num : UInt64 = 0
@@ -173,7 +173,7 @@ public final class TopicId: EntityId {
173173/// The unique identifier for a token on Hedera.
174174public final class TokenId : EntityId {
175175 public static func fromBytes( _ bytes: Data ) throws -> Self {
176- try bytes. withUnsafeBytes { ( pointer: UnsafeRawBufferPointer ) in
176+ try bytes. withUnsafeTypedBytes { pointer in
177177 var shard : UInt64 = 0
178178 var realm : UInt64 = 0
179179 var num : UInt64 = 0
@@ -199,7 +199,7 @@ public final class TokenId: EntityId {
199199/// The unique identifier for a schedule on Hedera.
200200public final class ScheduleId : EntityId {
201201 public static func fromBytes( _ bytes: Data ) throws -> Self {
202- try bytes. withUnsafeBytes { ( pointer: UnsafeRawBufferPointer ) in
202+ try bytes. withUnsafeTypedBytes { pointer in
203203 var shard : UInt64 = 0
204204 var realm : UInt64 = 0
205205 var num : UInt64 = 0
0 commit comments