![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
tolk-codegen
Advanced tools
## Example generator ### Create builder file in root folder ``builder.ts``
builder.ts
import {createBuildsTolkToFile, createStorageTolkToFile, createOpsFile, createParsersTolkToFile} from "tolk-codegen";
async function build() {
createStorageTolkToFile(Store, "contract.store.tolk");
createBuildsTolkToFile([TokenNotification], [], "contract.builders.tolk");
createParsersTolkToFile([TokenNotification], [], "contract.parsers.tolk");
createOpsFile([TokenNotification], "ops.tolk");
}
build();
Start builder use nodemon nodemon --watch 'wrappers/**/*.ts' --exec 'ts-node' ./builder.ts
import {StoreUint, StoreAddress, StoreBit} from "tolk-codegen";
import {Address} from "@ton/core";
@DefineCell()
class Store {
@StoreUint(32)
seqno!: BigInt;
@StoreAddress()
owner!: Address;
@StoreBit()
stop!: boolean;
}
contract.store.tolk
global seqno: int;
global owner: slice;
global stop: int;
@inline
fun saveStorage(){
setContractData(
beginCell()
.storeUint(seqno, 32).storeSlice(owner).storeBool(stop)
.endCell()
);
}
@inline
fun loadStorage(){
var sc = getContractData().beginParse();
seqno = sc.loadUint(32);
owner = sc.loadAddress();
stop = sc.loadBool();
}
import {DefineCell, DefineMessage, StoreCoins, StoreAddress, StoreSliceRemaining} from "tolk-codegen";
import {Address, Slice} from "@ton/core";
@DefineCell()
@DefineMessage(BigInt(0x7362d09c))
class TokenNotification extends BaseMessageWithQueryId{
@StoreCoins()
amount!: BigInt;
@StoreAddress()
from!: Address;
@StoreSliceRemaining()
forwardPayload!: Slice;
}
contract.builders.tolk
@inline // buildCellTokenNotification(op: int, queryId: int, amount: int, from: slice, forwardPayload: slice);
fun buildCellTokenNotification(op: int, queryId: int, amount: int, from: slice, forwardPayload: slice): cell{
var data = beginCell();
data.storeUint(op, 32);
data.storeUint(queryId, 64);
data.storeCoins(amount);
data.storeSlice(from);
data.storeSlice(forwardPayload);
return data.endCell();
}
contract.parsers.tolk
@inline // var (op, queryId, amount, from, forwardPayload) = parseCellTokenNotification(data);
fun parseCellTokenNotification(data: cell): (int, int, int, slice, slice){
return parseSliceTokenNotification(data.beginParse());
}
@inline // var (op, queryId, amount, from, forwardPayload) = parseSliceTokenNotification(sc);
fun parseSliceTokenNotification(sc: slice): (int, int, int, slice, slice){
return (sc.loadUint(32), sc.loadUint(64), sc.loadCoins(), sc.loadAddress(), sc.loadBits(sc.getRemainingBitsCount()));
}
ops.tolk
const TokenNotificationOP = 0x7362d09c;
import {buildCell, parseCell} from "tolk-codegen";
import {Address, Cell} from "@ton/core";
export class MyContract implements Contract {
constructor(readonly address: Address, readonly init?: { code: Cell; data: Cell }) {
}
static createFromAddress(address: Address) {
return new MyContract(address);
}
async getContractData(provider: ContractProvider){
return await provider.getState().then(value => {
if(value.state.type =='active'){
return parseCell(Cell.fromBoc(value.state.data!)[0], Store)
}
return null;
})
}
async sendMessage(provider: ContractProvider, via: Sender, message: MyMessage | TokenNotification, value: bigint) {
await provider.internal(via, {
value,
sendMode: SendMode.PAY_GAS_SEPARATELY,
body: buildCell(message),
});
}
}
FAQs
## Example generator ### Create builder file in root folder ``builder.ts``
The npm package tolk-codegen receives a total of 1 weekly downloads. As such, tolk-codegen popularity was classified as not popular.
We found that tolk-codegen demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.