Skip to content

Instantly share code, notes, and snippets.

View Datswishty's full-sized avatar
🛸

Vadim Urlin Datswishty

🛸
View GitHub Profile
import { compileFunc } from "@ton-community/func-js";
import { SmartContract } from "ton-contract-executor";
import { Cell } from "ton";
import {readFileSync} from "fs";
async function main() {
const compileResult = await compileFunc({
entryPoints: ["main.fc"],
#include "stdlib.fc";
() recv_internal(slice in_msg_body) impure {
throw_if(35,in_msg_body.slice_bits() < 32);
int n = in_msg_body~load_uint(32);
slice ds = get_data().begin_parse();
int total = ds~load_uint(64);
total += n;