Skip to content

Commit

Permalink
Merge pull request #55 from ston-fi/upstream-0.15.0
Browse files Browse the repository at this point in the history
Upstream 0.15.0
  • Loading branch information
ruslanracheev authored May 10, 2024
2 parents 6dddd7f + 7b4a834 commit 18fd602
Show file tree
Hide file tree
Showing 62 changed files with 4,361 additions and 2,026 deletions.
5 changes: 5 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[profile.default]
slow-timeout = { period = "30s", terminate-after = 4 }
success-output = "never"
failure-output = "final"
retries = 20
2 changes: 1 addition & 1 deletion .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ reorder_imports=true
imports_layout = "Mixed"
group_imports="StdExternalCrate"

reorder_modules=true
reorder_modules=true
15 changes: 7 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tonlib"
version = "0.14.5"
version = "0.15.0"
edition = "2021"
description = "Rust SDK for The Open Network"
license = "MIT"
Expand All @@ -12,18 +12,18 @@ include = [
]

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


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

[dependencies]
async-trait = "0.1"
base64 = "0.21"
base64 = "0.22"
base64-serde = "0.7"
bitstream-io = "1"
bitstream-io = "2.2"
crc = "3"
dashmap = "5"
futures = "0.3"
Expand All @@ -40,15 +40,14 @@ serde = { version = "1", features = ["derive"] }
serde-aux = "4"
serde_json = "1"
sha2 = "0.10"
strum = { version = "0.25", features = ["derive"] }
strum = { version = "0.26", features = ["derive"] }
pbkdf2 = { version="0.12", features = ["simple"] }
reqwest = "0.11"
reqwest = "0.12"
thiserror = "1"
tokio = { version = "1", features = ["rt","macros"] }
tokio-retry = "0.3"
tonlib-sys = "=2024.3.7"


[dev-dependencies]
anyhow = "1"
log4rs = "1"
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ async fn create_jetton_transfer() -> anyhow::Result<()> {
let jetton_master =
contract_factory.get_contract(&jetton_master_address);
let self_jetton_wallet_addr = jetton_master.get_wallet_address(&self_address).await?;
let wallet = TonWallet::derive(0, WalletVersion::V4R2, &key_pair, None)?;
let wallet = TonWallet::derive_default(WalletVersion::V4R2, &key_pair)?;
let dest: TonAddress = "<destination wallet address>".parse()?;
let src: TonAddress = "<source wallet address>".parse()?;
let jetton_amount = BigUint::from(1000000u64);
Expand All @@ -363,7 +363,7 @@ async fn create_jetton_transfer() -> anyhow::Result<()> {
let now = SystemTime::now()
.duration_since(SystemTime::UNIX_EPOCH)?
.as_secs() as u32;
let body = wallet.create_external_body(now + 60, seqno.try_into().unwrap(), transfer)?;
let body = wallet.create_external_body(now + 60, seqno.try_into().unwrap(), vec![transfer])?;
let signed = wallet.sign_external_body(&body)?;
let wrapped = wallet.wrap_signed_body(signed)?;
let boc = BagOfCells::from_root(wrapped);
Expand Down Expand Up @@ -407,14 +407,14 @@ async fn create_simple_transfer() -> anyhow::Result<()> {


let client = TonClient::default().await?;
let wallet = TonWallet::derive(0, WalletVersion::V4R2, &key_pair, None)?;
let wallet = TonWallet::derive_default(WalletVersion::V4R2, &key_pair)?;
let dest: TonAddress = "<destination wallet address>".parse()?;
let value = BigUint::from(10000000u64); // 0.01 TON
let transfer = TransferMessage::new(&dest, &value).build()?;
let now = SystemTime::now()
.duration_since(SystemTime::UNIX_EPOCH)?
.as_secs() as u32;
let body = wallet.create_external_body(now + 60, seqno, transfer)?;
let body = wallet.create_external_body(now + 60, seqno, vec![transfer])?;
let signed = wallet.sign_external_body(&body)?;
let wrapped = wallet.wrap_signed_body(signed)?;
let boc = BagOfCells::from_root(wrapped);
Expand Down
Loading

0 comments on commit 18fd602

Please sign in to comment.