{"id":16511108,"url":"https://github.com/danog/toncontest","last_synced_at":"2026-05-11T08:29:25.857Z","repository":{"id":93800968,"uuid":"215803100","full_name":"danog/toncontest","owner":"danog","description":"My submission to the TON blockchain contest","archived":false,"fork":false,"pushed_at":"2019-10-17T13:46:01.000Z","size":130,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-12T20:13:04.256Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-17T13:45:24.000Z","updated_at":"2022-05-07T20:52:02.000Z","dependencies_parsed_at":"2023-03-12T14:30:56.268Z","dependency_job_id":null,"html_url":"https://github.com/danog/toncontest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danog%2Ftoncontest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danog%2Ftoncontest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danog%2Ftoncontest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danog%2Ftoncontest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danog","download_url":"https://codeload.github.com/danog/toncontest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241476435,"owners_count":19968916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T15:58:57.147Z","updated_at":"2026-05-11T08:29:25.812Z","avatar_url":"https://github.com/danog.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Daniil Gentili entry\n\nThis is my entry for the TON contest.\n\n## Building\n\nSimply run the build.sh script to automatically build tonlib and set up some simplified wrapper scripts.\n\n```\ntoolchain/build.sh\n```\n\nThis will automatically build the lite client, fift and func, and will also edit .bashrc to add some wrapper scripts to the PATH.\n\n* `lite-client` runs the lite client, already preconfigured to connect to the testnet, with db path set to $TONLIB_HOME/../ton-db-dir (aka this repo/ton-db-dir).\n* `funcompile` is a wrapper for the `func` compiler, automatically including the stdlib while compiling.\n* `fift` is a simple wrapper for the fift compiler.\n\n## Contents\n\n* `wallet` - Advanced upgradable multisignature wallet, along with a TON collator emulator testing suite written in FIFT, and some scripts to test the wallet using the actual TON collator.\n* `toolchain` - Some automatic builder scripts and wrappers around the funC compiler and fift, along with a tweaked zerostate generator and testgiver scripts.\n* `test` - A small bugreport about issues with fift exception traces\n* [GitHub issues and bugreports](https://github.com/ton-blockchain/ton/issues?utf8=%E2%9C%93\u0026q=author%3Adanog+):\n  * [#59, bug in funC compiler](https://github.com/ton-blockchain/ton/issues/59)\n  * [#96, issues with fift exception traces](https://github.com/ton-blockchain/ton/issues/96)\n  * [#87, pull request with more funC dictionary manipulation primitives](https://github.com/ton-blockchain/ton/pull/87)\n  * [#98, pull request with minor fift script shebang fixes](https://github.com/ton-blockchain/ton/pull/98)\n  * [#144, missing create-state instructions](https://github.com/ton-blockchain/ton/issues/144)\n* Another improvement for the funC language would be the implementation of more tuple manipulation primitives, such as quiet tuple fetching primitives:\n```\n// \u003ctype\u003e \u003ctype\u003e_atq(tuple t, int index) asm \"INDEXVARQ\";\nAsmOp compile_tuple_atq(std::vector\u003cVarDescr\u003e\u0026 res, std::vector\u003cVarDescr\u003e\u0026 args) {\n  assert(args.size() == 2 \u0026\u0026 res.size() == 1);\n  auto\u0026 y = args[1];\n  if (y.is_int_const() \u0026\u0026 y.int_const \u003e= 0 \u0026\u0026 y.int_const \u003c 16) {\n    y.unused();\n    return exec_arg_op(\"INDEXQ\", y.int_const, 1, 1);\n  }\n  return exec_op(\"INDEXVARQ\", 2, 1);\n}\n\n// ...\n\n  define_builtin_func(\"int_atq\", TypeExpr::new_map(TupleInt, Int), compile_tuple_atq);\n  define_builtin_func(\"cell_atq\", TypeExpr::new_map(TupleInt, Cell), compile_tuple_atq);\n  define_builtin_func(\"slice_atq\", TypeExpr::new_map(TupleInt, Cell), compile_tuple_atq);\n  define_builtin_func(\"tuple_atq\", TypeExpr::new_map(TupleInt, Tuple), compile_tuple_atq);\n  define_builtin_func(\"atq\", TypeExpr::new_forall({X}, TypeExpr::new_map(TupleInt, X)), compile_tuple_atq);\n```\n\n...as well as tuple set primitives (which I actually intended to implement in funC and use in a previous version of the wallet smart contract, then scrapped in favor of a simple dictionary).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanog%2Ftoncontest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanog%2Ftoncontest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanog%2Ftoncontest/lists"}