Skip to content

Commit

Permalink
Merge pull request #927 from tonlabs/abi-2.4
Browse files Browse the repository at this point in the history
Bug fix
  • Loading branch information
IgorKoval authored Nov 20, 2023
2 parents 805323e + 981dafb commit 133ea2a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 22 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## 0.36.0

- Supported [ABI 2.4](https://github.com/tonlabs/ever-abi/blob/master/CHANGELOG.md#version-240)

## 0.35.7

### Bug fixes
Expand Down
19 changes: 10 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ license = 'Apache-2.0'
name = 'tonos-cli'
readme = 'README.md'
repository = 'https://github.com/tonlabs/tonos-cli'
version = '0.36.0'
version = '0.36.1'
default-run = 'tonos-cli'

[features]
Expand Down
26 changes: 14 additions & 12 deletions src/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,18 +147,20 @@ pub async fn prepare_deploy_message_params(
) -> Result<(ParamsOfEncodeMessage, String), String> {
let tvc = base64::encode(&tvc_bytes);


// let tvc_cell = ton_types::boc::read_single_root_boc(&tvc_bytes).unwrap();
// let tvc_hash = tvc_cell.repr_hash();
// let address = format!("{}:{}", wc, tvc_hash.as_hex_string());
// TODO DELETE this ?
let address = crate::helpers::calc_acc_address(
tvc_bytes,
wc,
keys.as_ref().map(|k| k.public.clone()),
None,
abi.clone()
).await?;
let data_map_supported = abi.abi().unwrap().data_map_supported();
let address = if data_map_supported {
crate::helpers::calc_acc_address(
tvc_bytes,
wc,
keys.as_ref().map(|k| k.public.clone()),
None,
abi.clone()
).await?
} else {
let tvc_cell = ton_types::boc::read_single_root_boc(&tvc_bytes).unwrap();
let tvc_hash = tvc_cell.repr_hash();
format!("{}:{}", wc, tvc_hash.as_hex_string())
};

let header = Some(FunctionHeader {
time: Some(time),
Expand Down

0 comments on commit 133ea2a

Please sign in to comment.