how to get stateinit from code and data?
let stateInit = new Cell({refs: [code,data]}); is it right way to do with latest version of ton js library?

Feb 11, 2023, 10:24 AM
🥹
Feb 11, 2023, 10:29 AM
There's type "StateInit"
Feb 11, 2023, 10:40 AM
how to use?
Feb 11, 2023, 10:48 AM
Depends on where do you need it
Feb 11, 2023, 10:48 AM
i need to use in tonweb transfer function stateinit param
Feb 11, 2023, 10:49 AM
Usually you just write
{
code: ...,
data: ...
}
tonweb? Didn't you say "ton js"?
Feb 11, 2023, 10:54 AM
i am talking about this param https://github.com/toncenter/tonweb/blob/master/src/test-wallet4.js#L76
Feb 11, 2023, 10:54 AM
Tonweb and ton.js are different libraries
Feb 11, 2023, 10:54 AM
This is example for TonWeb.
let stateInit = new TonWeb.boc.Cell();
stateInit.bits.writeUint(6, 5);
stateInit.refs.push(code);
stateInit.refs.push(data);
Feb 11, 2023, 10:55 AM
this data is valid to pass into .storeDict() ?
Feb 11, 2023, 11:12 AM
can use Tact maybe 😼
what is the usage / example for subscription here?
Mar 5, 2023, 4:51 AM
???
Mar 5, 2023, 5:05 AM

© 2024 Draquery.com All rights reserved.