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

Toncli deploys into the same address every time #105

Closed
avevad opened this issue Dec 18, 2022 · 1 comment
Closed

Toncli deploys into the same address every time #105

avevad opened this issue Dec 18, 2022 · 1 comment

Comments

@avevad
Copy link

avevad commented Dec 18, 2022

Bug Type

Functional

Reproduction steps

  1. toncli deploy
  2. toncli deploy again

Actual result

The contract gets deployed to the same address over and over again, but all the times except the first TON CLI does nothing (because the address is already initialized)

Expected result

The contract deploys to a new address every time

Suggested Severity

High

Device

OS: Arch Linux x86_64 
Host: MS-7D18 2.0 
Kernel: 6.0.12-arch1-1
CPU: 11th Gen Intel i5-11600 (12) @ 4.800GHz 
GPU: Intel RocketLake-S GT1 [UHD Graphics 750] 
Memory: 15823MiB

Additional Context

No response

@tvorogme
Copy link
Contributor

tvorogme commented Dec 18, 2022

Address of smart contract in TON is calculated by StateInit hash, which includes code, data & libs. If you don't change data / code / libs you will get the same address.

If you want to save same code and data but deploy on new address, add now 32 u, in data.fif.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants