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

Cub #183

Open
Amerigxf opened this issue Jun 23, 2024 · 1 comment
Open

Cub #183

Amerigxf opened this issue Jun 23, 2024 · 1 comment

Comments

@Amerigxf
Copy link

fc";

const ONE_TON = 1000000000;

const MIN_STORAGE_DURATION = 5 * 365 * 24 * 3600; ;; 5 years

;;# Precompiled constants
;;
;;All of the contents are result of contract emulation tests
;;

;;## Minimal fees
;;
;;- Transfer /sandbox_tests/JettonWallet.spec.ts#L935 0.028627415 TON
;;- Burn /sandbox_tests/JettonWallet.spec.ts#L1185 0.016492002 TON

;;## Storage
;;
;;Get calculated in a separate test file /sandbox_tests/StateInit.spec.ts

;;- JETTON_WALLET_BITS /sandbox_tests/StateInit.spec.ts#L92
const JETTON_WALLET_BITS = 1033;

;;- JETTON_WALLET_CELLS: /sandbox_tests/StateInit.spec.ts#L92
const JETTON_WALLET_CELLS = 3;

;; difference in JETTON_WALLET_BITS/JETTON_WALLET_INITSTATE_BITS is difference in
;; StateInit and AccountStorage (https://github.com/ton-blockchain/ton/blob/master/crypto/block/block.tlb)
;; we count bits as if balances are max possible
;;- JETTON_WALLET_INITSTATE_BITS /sandbox_tests/StateInit.spec.ts#L95
const JETTON_WALLET_INITSTATE_BITS = 931;
;;- JETTON_WALLET_INITSTATE_CELLS /sandbox_tests/StateInit.spec.ts#L95
const JETTON_WALLET_INITSTATE_CELLS = 3;

;; jetton-wallet.fc#L163 - maunal bits counting
const BURN_NOTIFICATION_BITS = 754; ;; body = 32 64 124 (3 8 256) (3 8 256)
const BURN_NOTIFICATION_CELLS = 1; ;; body always in ref

;;## Gas
;;
;;Gas constants are calculated in the main test suite.
;;First the related transaction is found, and then it's
;;resulting gas consumption is printed to the console.

@andreypfau
Copy link
Member

It’s not entirely clear what the problem is, could you describe in more detail what’s going on?

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