Skip to content

Commit bcc2cd2

Browse files
committed
add NATIVE alias for TonAddress
1 parent d33ea7b commit bcc2cd2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ton_core/src/types/ton_address.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ pub struct TonAddress {
2929
impl TonAddress {
3030
// Is used to identify TON address
3131
pub const ZERO: Self = TonAddress::new(0, TonHash::ZERO);
32+
pub const NATIVE: Self = TonAddress::new(0, TonHash::ZERO);
33+
3234
pub fn is_zero(&self) -> bool { self == &TonAddress::ZERO }
35+
pub fn is_native(&self) -> bool { self == &TonAddress::NATIVE }
3336

3437
pub const fn new(workchain: i32, hash: TonHash) -> Self { Self { workchain, hash } }
3538

0 commit comments

Comments
 (0)