Skip to content

Commit 3a9c18d

Browse files
xJonathanLEIincrypto32
authored andcommitted
docs: document the Felt type
1 parent d9593ab commit 3a9c18d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

chain/starknet/src/felt.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ use std::{
66
use graph::anyhow;
77
use serde::{de::Visitor, Deserialize};
88

9+
/// Represents the primitive `FieldElement` type used in Starknet. Each `FieldElement` is 252-bit
10+
/// in size.
911
#[derive(Clone, PartialEq, Eq)]
1012
pub struct Felt([u8; 32]);
1113

1214
struct FeltVisitor;
1315

1416
impl Debug for Felt {
1517
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
16-
write!(f, "0x{}", hex::encode(&self.0))
18+
write!(f, "0x{}", hex::encode(self.0))
1719
}
1820
}
1921

0 commit comments

Comments
 (0)