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.18.0 #92

Merged
merged 76 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 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
7c913da
set version to 0.17.1-dev
dbaranov34 Jul 12, 2024
2847129
Impl #155: added tests for jetton_burn
dbaranovstonfi Jul 22, 2024
a9a6657
Merge branch '155-tests-for-jetton-tx-parsers' into 'main'
dbaranovstonfi Jul 22, 2024
7ed5d2a
Impl #150: Split tonlib to TonlibClient and Tonlib Core
dbaranovstonfi Jul 23, 2024
b2bfa02
Merge branch '150-split-client-and-dsl' into 'main'
Jul 23, 2024
25bbb87
Impl #158: Altered TxId + #150 comments
dbaranovstonfi Jul 25, 2024
3458a25
Merge branch '158-alter-txid-type' into 'main'
dbaranovstonfi Jul 25, 2024
9d31754
revert feature flag missing
dbaranov34 Jul 25, 2024
f6d71bc
Impl #163: Fixed slice conversion
dbaranovstonfi Jul 26, 2024
570edc3
Merge branch '163-fix-integration-tests' into 'main'
dbaranovstonfi Jul 26, 2024
68010bf
Impl #161: Added info about refs into CellParser
dbaranovstonfi Jul 30, 2024
df186ea
Merge branch '161-add-references-to-cell-parser' into 'main'
dbaranovstonfi Jul 30, 2024
be642de
Impl #160: Implement Either Cell ^Cell
dbaranovstonfi Jul 30, 2024
3bdf018
Merge branch '160-suport-either' into 'main'
dbaranovstonfi Jul 30, 2024
8057bd4
Impl #159: Implement generic TonMessage
dbaranovstonfi Aug 1, 2024
549e167
Merge branch '159-2-revert-to-tonmessage' into 'main'
dbaranovstonfi Aug 1, 2024
1820f00
NI: Altered RawTransaction structure: missed field fee
dbaranovstonfi Aug 2, 2024
550f516
Merge branch 'NI-missing-fee-in-raw-transaction' into 'main'
dbaranovstonfi Aug 2, 2024
4bd5921
bump build container: rust 1.80
dbaranov34 Aug 6, 2024
abd5140
Merge branch 'main' of ssh://git.stonfi.net:2222/ston-fi/rust/tonlib-rs
dbaranov34 Aug 6, 2024
3b7a16d
NI: clippy 80 fixes
dbaranovstonfi Aug 6, 2024
8a7eeb5
Merge branch 'NI-clippy-80' into 'main'
dbaranovstonfi Aug 6, 2024
08e60f4
Impl #167: Support TEP0062: nft
dbaranovstonfi Aug 8, 2024
7e02380
Merge branch '167-suport-nft' into 'main'
dbaranovstonfi Aug 8, 2024
0afa0f3
Impl #168: fixed misaligned ints when storeInt
dbaranovstonfi Aug 12, 2024
d8eb5ee
Merge branch '168-fix-zero-in-store-uint' into 'main'
dbaranovstonfi Aug 12, 2024
51a15bf
Impl #170: fixed dict_loader
dbaranovstonfi Aug 19, 2024
706f7c5
Merge branch '170-load-dict-ail' into 'main'
dbaranovstonfi Aug 19, 2024
cac68d6
Impl #169: Added error returns to descriptor generators and tests
dbaranovstonfi Aug 19, 2024
fb08804
Merge branch '169-fix-descriptor-with-tests' into 'main'
dbaranovstonfi Aug 19, 2024
66446ef
Impl #166: supported tep 0085
dbaranovstonfi Aug 20, 2024
7ff6b02
Merge branch '166-suport-sbt' into 'main'
dbaranovstonfi Aug 20, 2024
d4ede6d
Impl #171: Support references in load_either_cell_or_cell_ref"
dbaranovstonfi Aug 28, 2024
92c52fb
Merge branch '171-3-port-changes-form-0.17' into 'main'
dbaranovstonfi Aug 28, 2024
2cec069
Impl #BACK-1329 : ignored ipfs tests. fixed config, fixed bug in jett…
dbaranovstonfi Sep 17, 2024
ca026a6
Merge branch 'back-1329' into 'main'
dbaranovstonfi Sep 17, 2024
2f29737
altered BlockIdExt type
dbaranov34 Sep 17, 2024
11ec9f9
fixed test
dbaranov34 Sep 17, 2024
8ed082a
fmt
dbaranov34 Sep 17, 2024
d31bcec
Merge branch 'back-1332-blockidext-type' into 'main'
dbaranovstonfi Sep 17, 2024
83a3cfb
merge upstream/main
dbaranov34 Sep 17, 2024
57180ed
bump version
dbaranov34 Sep 17, 2024
6343468
Merge remote-tracking branch 'upstream/main' into upstream-0.18.0
dbaranov34 Sep 17, 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 .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[profile.default]
slow-timeout = { period = "30s", terminate-after = 4 }
slow-timeout = { period = "90s", terminate-after = 4 }
success-output = "never"
failure-output = "final"
retries = 20
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@
.vscode/

# Config
/resources/config/local
/client/resources/config/local
/client/var
/var
36 changes: 16 additions & 20 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
[package]
name = "tonlib"
version = "0.17.6"
[workspace]
members = [
"core",
"client",
]

resolver = "2"


[workspace.package]
version = "0.18.0"
edition = "2021"
description = "Rust SDK for The Open Network"
license = "MIT"
repository = "https://github.com/ston-fi/tonlib-rs"
include = [
"src/*",
"resources/*",
"Cargo.toml"
]

[features]
default=[]
state_cache = []
emulate_get_method = []
with_c_backtrace = ["tonlib-sys/with_debug_info"]
no_avx512 = ["tonlib-sys/no_avx512"]


# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
[workspace.dependencies]
anyhow = "1"
async-trait = "0.1"
base64 = "0.22"
base64-serde = "0.7"
Expand All @@ -32,6 +31,7 @@ hex = "0.4"
hmac = {version = "0.12", features = ["std"]}
lazy_static = "1"
log = "0.4"
log4rs = "1"
moka = { version = "0.12", features = ["future"] }
nacl = "0.5"
num-bigint = { version = "0.4", features = ["serde"] }
Expand All @@ -47,9 +47,5 @@ reqwest = "0.12"
thiserror = "1"
tokio = { version = "1", features = ["rt","macros"] }
tokio-retry = "0.3"
tonlib-sys = "=2024.8"

[dev-dependencies]
anyhow = "1"
log4rs = "1"
tokio-test = "0.4"
tonlib-sys = "=2024.8.0"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ async fn call_blockchain_methods()-> anyhow::Result<()>{
txs.incomplete
);
for tx_id in txs.transactions {
let mut t: [u8; 32] = [0; 32];
let mut t: Hash256Bit = ZERO_HASH;
t.clone_from_slice(tx_id.account.as_slice());
let addr = TonAddress::new(workchain, &t);
let id = InternalTransactionId {
Expand Down
57 changes: 57 additions & 0 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[package]
name = "tonlib-client"
description = "Thin wrapper for tonlibjson"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true


include = [
"src/*",
"resources/*",
"Cargo.toml"
]

[features]
default=["state_cache", "emulate_get_method"]
state_cache = []
emulate_get_method = []
no_avx512 = ["tonlib-sys/no_avx512"]
with_debug_info = ["tonlib-sys/with_debug_info"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow.workspace = true
async-trait.workspace = true
base64.workspace = true
base64-serde.workspace = true

crc.workspace = true
dashmap.workspace = true
futures.workspace = true
hex.workspace = true

lazy_static.workspace = true
log.workspace = true
log4rs.workspace = true
num-bigint.workspace = true
num-traits.workspace = true
moka.workspace = true
pbkdf2.workspace = true
rand.workspace = true
reqwest.workspace = true
serde.workspace = true
serde-aux.workspace = true
serde_json.workspace = true
sha2.workspace = true
strum.workspace = true
thiserror.workspace = true
tokio.workspace = true
tokio-retry.workspace = true
tokio-test.workspace = true
tonlib-sys.workspace = true


tonlib-core = {path = "../core"}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,9 @@
"file_hash": "XplPz01CXAps5qeSWUtxcyBfdAo5zVb1N979KLSKD24="
},
"init_block": {
"root_hash": "VpWyfNOLm8Rqt6CZZ9dZGqJRO3NyrlHHYN1k1oLbJ6g=",
"seqno": 34835953,
"file_hash": "8o12KX54BtJM8RERD1J97Qe1ZWk61LIIyXydlBnixK8=",
"root_hash": "WFgmnfd3wuQR9HydL54EjcuDvLYM/SIwDbDxbNzDyjU=",
"seqno": 39812357,
"file_hash": "scgMz5C3n0uBeb2pdf2e8/BWlfzTB8FcRsNvvHgXKYM=",
"workchain": -1,
"shard": -9223372036854775808
},
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use async_trait::async_trait;
use futures::future::try_join_all;
use futures::FutureExt;
use tonlib_core::TonAddress;

use crate::address::TonAddress;
use crate::client::{TonClientError, TonClientInterface, TxId};
use crate::tl::{
BlockIdExt, BlocksAccountTransactionId, BlocksTransactions, RawTransaction,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/client/error.rs → client/src/client/error.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::io;

use thiserror::Error;
use tonlib_core::TonAddressParseError;

use crate::address::TonAddressParseError;
use crate::tl::{TlError, TonResult, TonResultDiscriminants};

#[derive(Error, Debug)]
Expand Down
2 changes: 1 addition & 1 deletion src/client/interface.rs → client/src/client/interface.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use async_trait::async_trait;
use tonlib_core::TonAddress;

use super::{SmcLibraryQueryExt, SmcLibraryResult, SmcLibraryResultExt, TonLibraryId};
use crate::address::TonAddress;
use crate::client::{TonClientError, TonConnection};
use crate::contract::LoadedSmcState;
use crate::tl::{
Expand Down
2 changes: 1 addition & 1 deletion src/client/types.rs → client/src/client/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ use std::sync::Arc;
use lazy_static::lazy_static;
use serde::{Deserialize, Serialize};
use tokio::sync::broadcast;
use tonlib_core::TonAddress;

use super::{
BlocksShortTxId, TonClientError, DEFAULT_CONNECTION_CONCURRENCY_LIMIT,
DEFAULT_NOTIFICATION_QUEUE_LENGTH,
};
use crate::address::TonAddress;
use crate::config::MAINNET_CONFIG;
use crate::tl::{InternalTransactionId, TonNotification};

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/contract.rs → client/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ pub use jetton::*;
pub use latest_transactions_cache::*;
pub use nft::*;
pub use state::*;
use tonlib_core::TonAddress;
pub use wallet::*;

use crate::address::TonAddress;
use crate::client::TonClientInterface;
use crate::tl::{InternalTransactionId, RawFullAccountState};
use crate::types::{TonMethodId, TvmStackEntry, TvmSuccess};
Expand Down
4 changes: 2 additions & 2 deletions src/contract/error.rs → client/src/contract/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
use std::sync::Arc;

use thiserror::Error;
use tonlib_core::cell::TonCellError;
use tonlib_core::TonAddress;

use crate::address::TonAddress;
use crate::cell::TonCellError;
use crate::client::TonClientError;
use crate::emulator::TvmEmulatorError;
use crate::tl::TvmStackError;
Expand Down
2 changes: 1 addition & 1 deletion src/contract/factory.rs → client/src/contract/factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ pub use cache::*;
pub use library_loader::*;
pub use library_provider::*;
use tokio::sync::OnceCell;
use tonlib_core::TonAddress;

use crate::address::TonAddress;
use crate::client::{TonClient, TonClientError, TonClientInterface};
use crate::contract::{LoadedSmcState, TonContract, TonContractError, TonContractState};
use crate::tl::{ConfigInfo, InternalTransactionId, RawFullAccountState};
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use std::time::Duration;
use futures::future::join_all;
use futures::join;
use moka::future::Cache;
use tonlib_core::TonAddress;

use crate::address::TonAddress;
use crate::client::{
BlockStream, BlockStreamItem, TonBlockFunctions, TonClient, TonClientInterface,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::sync::Arc;
use async_trait::async_trait;
use base64::engine::general_purpose::STANDARD;
use base64::Engine;
use tonlib_core::TonAddress;

use crate::address::TonAddress;
use crate::client::{TonClient, TonClientInterface};
use crate::contract::TonContractError;
use crate::tl::{SmcLibraryQueryExt, TonLibraryId};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use std::sync::Arc;

use tonlib_core::TonAddress;

use super::{ContractLibraryDict, LibraryLoader};
use crate::address::TonAddress;
use crate::contract::TonContractError;
use crate::tl::RawFullAccountState;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::sync::Arc;

use async_trait::async_trait;
use tonlib_core::TonAddress;

use super::TonContractError;
use crate::address::TonAddress;
use crate::client::TonConnection;
use crate::contract::TonContractFactory;
use crate::tl::RawFullAccountState;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use async_trait::async_trait;
use num_bigint::BigUint;
use strum::IntoStaticStr;
use tonlib_core::cell::{ArcCell, BagOfCells, CellBuilder, CellSlice, TonCellError};
use tonlib_core::TonAddress;

use crate::address::TonAddress;
use crate::cell::{ArcCell, BagOfCells, CellBuilder, CellSlice, TonCellError};
use crate::contract::{MapCellError, MapStackError, TonContractError, TonContractInterface};
use crate::meta::MetaDataContent;
use crate::types::TvmStackEntry;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use async_trait::async_trait;
use num_bigint::BigUint;
use strum::IntoStaticStr;
use tonlib_core::cell::ArcCell;
use tonlib_core::TonAddress;

use crate::address::TonAddress;
use crate::cell::ArcCell;
use crate::contract::{MapStackError, TonContractError, TonContractInterface};

#[derive(Debug, Clone)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use std::sync::Arc;
use std::time::{Duration, SystemTime, UNIX_EPOCH};

use tokio::sync::Mutex;
use tonlib_core::TonAddress;

use crate::address::TonAddress;
use crate::client::TonClientError;
use crate::contract::{TonClientInterface, TonContractError, TonContractFactory};
use crate::tl::{InternalTransactionId, RawTransaction, NULL_TRANSACTION_ID};
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use async_trait::async_trait;
use num_bigint::BigUint;
use num_traits::Zero;
use strum::IntoStaticStr;
use tonlib_core::cell::{ArcCell, BagOfCells};
use tonlib_core::TonAddress;

use crate::address::TonAddress;
use crate::cell::{ArcCell, BagOfCells};
use crate::contract::factory::TonContractFactory;
use crate::contract::{
MapCellError, MapStackError, NftItemContract, TonContractError, TonContractInterface,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use async_trait::async_trait;
use factory::TonContractFactory;
use num_bigint::{BigInt, BigUint};
use strum::IntoStaticStr;
use tonlib_core::cell::{ArcCell, BagOfCells};
use tonlib_core::TonAddress;

use crate::address::TonAddress;
use crate::cell::{ArcCell, BagOfCells};
use crate::contract::{
factory, MapCellError, MapStackError, TonContractError, TonContractInterface,
};
Expand Down
4 changes: 2 additions & 2 deletions src/contract/state.rs → client/src/contract/state.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::sync::Arc;

use async_trait::async_trait;
use tonlib_core::cell::Cell;
use tonlib_core::TonAddress;

use crate::address::TonAddress;
use crate::cell::Cell;
use crate::client::{TonClientError, TonClientInterface};
use crate::contract::{TonContractError, TonContractFactory, TonContractInterface};
use crate::emulator::{TvmEmulator, TvmEmulatorC7Builder};
Expand Down
File renamed without changes.
Loading
Loading