Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream 0.17.5 #87

Merged
merged 54 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
a45653e
Downstream 0.15.2
dbaranovstonfi Jun 10, 2024
67bd45a
Merge branch 'downstream-0.15.2' into 'main'
dbaranovstonfi Jun 10, 2024
90541b6
Downstream 0.15.3
dbaranovstonfi Jun 12, 2024
efbeab6
Merge branch 'downstream-0.15.3' into 'main'
dbaranovstonfi Jun 12, 2024
70223d3
Impl 114: store_uint, store_int + tests
Jun 6, 2024
12df404
Impl #144: fix cargo clippy
Jun 11, 2024
03e07b7
fix comments
Jun 13, 2024
3afebe6
Merge branch '144-fix-store-int-panic' into 'main'
Jun 13, 2024
fbd556e
NI: bump rust-build container
dbaranovstonfi Jun 26, 2024
33c58d0
Merge branch 'NI-bump-container' into 'main'
dbaranovstonfi Jun 26, 2024
d29d3fc
Impl #NI: add trace logs around TvmEmulatorUnsafe methods
Jun 19, 2024
0244ab0
Merge branch 'ni-trace-logs-for-tonlibjson-usage' into 'main'
dbaranovstonfi Jun 26, 2024
d707be7
Impl #142: Added timestamp limit to LatestContactTransactionCache
Jun 26, 2024
87c2715
Merge branch '142-add_timestamp_limit' into 'main'
dbaranovstonfi Jun 26, 2024
d43113f
Merge remote-tracking branch 'upstream/main'
dbaranov34 Jun 28, 2024
ca4ad69
NI: misc fixes after updating clippy to 1.79
dbaranovstonfi Jul 1, 2024
cce737f
Merge branch 'NI-clippy-updated' into 'main'
dbaranovstonfi Jul 1, 2024
6ed55d5
Impl #147: parsers and some refactoring of jettons
dbaranovstonfi Jul 2, 2024
0e11a56
Merge branch '147-jetton-transfer-parser' into 'main'
dbaranovstonfi Jul 2, 2024
4552309
Impl #149: exotic cells support
Jul 4, 2024
b910921
Merge branch '149-exotic-cells' into 'main'
Jul 4, 2024
19d6c8a
Resolve "Implement exotic cells support"
Jul 4, 2024
c4dae48
Merge branch '149-exotic-cells' into 'main'
Jul 4, 2024
40f29ba
Impl #156: Remove AsRef<ArcCell>
SlavikBaranov Jul 8, 2024
086d485
Merge branch '156-no-asref' into 'main'
Jul 8, 2024
7788f64
NI: Downstream 0.16
dbaranovstonfi Jul 11, 2024
e032a37
Merge branch 'downstream-0.16.0' into 'main'
dbaranovstonfi Jul 11, 2024
351769d
NI: fix transfer_notification parser/builder, added tests
SathemBite Jul 11, 2024
440e501
Merge branch 'ni-fix-transfer-notification' into 'main'
dbaranovstonfi Jul 11, 2024
f5345b6
NI: fix tests
SathemBite Jul 11, 2024
3d907b4
Merge branch 'ni-fix-tests' into 'main'
dbaranovstonfi Jul 11, 2024
170251f
NI: downstram v0.17.0
dbaranovstonfi Jul 12, 2024
cee724e
Merge branch 'downstream-0.17.0' into 'main'
dbaranovstonfi Jul 12, 2024
8379e3e
NI: CellBuilder and CellParser modifications torn out from 0.18.0-dev
dbaranovstonfi Aug 7, 2024
d37fca6
Merge branch 'NI-cherry-pick-either-and-maybe' into '0.17-extended-su…
dbaranovstonfi Aug 7, 2024
8770433
ignoring remaining refs
dbaranov34 Aug 7, 2024
419fa20
Merge remote-tracking branch 'upstream/main' into 0.17-extended-support
dbaranov34 Aug 7, 2024
b216c87
clippy
dbaranov34 Aug 8, 2024
ae06ec6
Impl #168: Fix byte alignment in CellBuilder
dbaranovstonfi Aug 8, 2024
c86f5fb
Merge branch '168-fix-cell-builder' into '0.17-extended-support'
dbaranovstonfi Aug 8, 2024
a16c8f9
Impl #169: fixed d2 descriptor of cell
dbaranovstonfi Aug 13, 2024
fe4cc45
Merge branch '169-fix-descriptor' into '0.17-extended-support'
dbaranovstonfi Aug 13, 2024
7b7c68b
Downstream 0.17.2
dbaranovstonfi Aug 13, 2024
c253874
Merge branch 'downstream-0.17.2' into '0.17-extended-support'
dbaranovstonfi Aug 13, 2024
8433ff9
fixed load _dict
dbaranov34 Aug 14, 2024
a576d26
Downstream 0.17.3
dbaranovstonfi Aug 16, 2024
2c11a9e
Merge branch 'downstream-0.17.3' into '0.17-extended-support'
dbaranovstonfi Aug 16, 2024
3b86873
bump sys version
dbaranov34 Aug 16, 2024
9a6ee86
Downstram 0.17.4
dbaranovstonfi Aug 19, 2024
4700439
Merge branch 'downstream-0.17.4' into '0.17-extended-support'
dbaranovstonfi Aug 19, 2024
a1d0b68
Impl#171; Support references in load_either_cell_or_cell_ref
dbaranovstonfi Aug 28, 2024
0a3d3a8
Merge branch '171-2-either-cell' into '0.17-extended-support'
dbaranovstonfi Aug 28, 2024
4bda482
Merge remote-tracking branch 'upstream/main' into upstream-0.17.5
dbaranov34 Aug 28, 2024
f5c636f
bump version
dbaranov34 Aug 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tonlib"
version = "0.17.4"
version = "0.17.5"
edition = "2021"
description = "Rust SDK for The Open Network"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/cell/dict_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ mod test {
#[test]
fn dict_loader_test() {
let dict_boc_str = "te6cckEBBgEAWgABGccNPKUADZm5MepOjMABAgHNAgMCASAEBQAnQAAAAAAAAAAAAAABMlF4tR2RgCAAJgAAAAAAAAAAAAABaFhaZZhr6AAAJgAAAAAAAAAAAAAAR8sYU4eC4AA1PIC5";
let dict_boc = BagOfCells::parse_base64(&dict_boc_str).unwrap();
let dict_boc = BagOfCells::parse_base64(dict_boc_str).unwrap();
let cell = dict_boc.single_root().unwrap();
let loader = GenericDictLoader::new(key_extractor_u8, value_extractor_uint, 8);
let result = cell
Expand Down
40 changes: 38 additions & 2 deletions src/cell/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,12 @@ impl<'a> CellParser<'a> {
} else {
let remaining_bits = self.remaining_bits();
let data = self.load_bits(remaining_bits)?;
let result = Arc::new(Cell::new(data, remaining_bits, vec![], false)?);
let remaining_ref_count = self.references.len() - self.next_ref;
let mut references = vec![];
for _ in 0..remaining_ref_count {
references.push(self.next_reference()?)
}
let result = Arc::new(Cell::new(data, remaining_bits, references, false)?);
Ok(result)
}
}
Expand All @@ -266,10 +271,12 @@ impl<'a> CellParser<'a> {
#[cfg(test)]
mod tests {

use std::sync::Arc;

use num_bigint::{BigInt, BigUint};

use crate::address::TonAddress;
use crate::cell::Cell;
use crate::cell::{Cell, CellBuilder};

#[test]
fn test_load_bit() {
Expand Down Expand Up @@ -545,4 +552,33 @@ mod tests {
assert!(parser.next_reference().is_ok());
assert!(parser.next_reference().is_err());
}

#[test]
fn test_either_with_references() {
let reference_cell = Cell::new([0xA5, 0x5A].to_vec(), 12, vec![], false).unwrap();
let cell_either = Arc::new(
Cell::new(
[0xFF, 0xB0].to_vec(),
12,
vec![reference_cell.into()],
false,
)
.unwrap(),
);
let cell = CellBuilder::new()
.store_bit(true)
.unwrap()
.store_either_cell_or_cell_ref(&cell_either)
.unwrap()
.build()
.unwrap();

let mut parser = cell.parser();

let result_first_bit = parser.load_bit().unwrap();
let result_cell_either = parser.load_either_cell_or_cell_ref().unwrap();

assert!(result_first_bit);
assert_eq!(result_cell_either, cell_either);
}
}
Loading