{"id":21588888,"url":"https://github.com/evmts/evmts-vm-example","last_synced_at":"2025-04-10T21:51:54.937Z","repository":{"id":207905054,"uuid":"720364439","full_name":"evmts/EVMts-VM-example","owner":"evmts","description":"An example of using the EVMts vm","archived":false,"fork":false,"pushed_at":"2024-01-25T07:06:49.000Z","size":219,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T21:51:51.614Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/evmts.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":"2023-11-18T08:54:08.000Z","updated_at":"2024-02-13T08:46:00.000Z","dependencies_parsed_at":"2024-11-24T23:15:39.728Z","dependency_job_id":null,"html_url":"https://github.com/evmts/EVMts-VM-example","commit_stats":null,"previous_names":["evmts/evmts-vm-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evmts%2FEVMts-VM-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evmts%2FEVMts-VM-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evmts%2FEVMts-VM-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evmts%2FEVMts-VM-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evmts","download_url":"https://codeload.github.com/evmts/EVMts-VM-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248305854,"owners_count":21081562,"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-11-24T16:11:51.399Z","updated_at":"2025-04-10T21:51:54.913Z","avatar_url":"https://github.com/evmts.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://evmts.dev/\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://user-images.githubusercontent.com/35039927/218812217-92f0f784-cb85-43b9-9ca6-e2b9effd9eb2.png\"\u003e\n      \u003cimg alt=\"wagmi logo\" src=\"https://user-images.githubusercontent.com/35039927/218812217-92f0f784-cb85-43b9-9ca6-e2b9effd9eb2.png\" width=\"auto\" height=\"300\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Evmts vm example\n\u003cp\u003e\n\n## ✨ EVMts Vm example\n\nStarter project of using Bun with EVMts. EVMts is a JavaScript framework for building blockchain applications. It includes the following features\n\n- An EVM that runs in Node.js and the browser\n- A bundler and LSP that allows one to import solidity files directly into JavaScript\n\n![Untitled_ Sep 9, 2023 9_27 AM (1)](https://github.com/evmts/bun-starterkit/assets/35039927/53685b10-2dc6-4115-9c37-b8340dc02536)\n\n## 🤝 Getting Started\n\n1. Install Node Modules\n\n```\nbun install\n```\n\n2. Run tests\n\n```\nbun test\n```\n\n3. Run [bun script](./readContract.ts) in watch mode\n\n```\nbun dev\n```\n\n## EVMts VM\n\nThe EVMts vm allows one to execute Solidity code directly in JS. It can fork a live network similar to ganache anvil or hardhat. It can also optionally take JavaScript functions as predeploys. In EVMts 1.0 this vm is used in a framework to enable optimistic updates.\n\n## EVMts bundler configuration\n\nEVMts works via a [bun plugin](https://bun.sh/docs/bundler/plugins). This includes:\n\n1. EVMts configuration which is in the [tsconfig.json](./tsconfig.json). Note in future EVMts will be configurable via a `evmts.config.ts` file.\n\nThe minimal configuration simply needs to specify typescript uses the `@evmts/ts-plugin` but it also has other configuration options. This template globally configured the contract addresses for [ExampleContract.sol](./ExampleContract.sol)\n\n2. Bun plugin configuration in the [plugins.ts](./plugins.ts) file along with loading the plugin file in [bunfig.toml](./bunfig.toml)\n\nThis enables bun to import solidity files\n\n## EVMts LSP\n\nEVMts LSP gives you language server functionality in your editor. In EVMts this includes many nice features\n\n- Natspec comments on hover\n- go-to-definition takes you directly to the solidity code that defined the contract method or event\n- Etherscan links to your contracts on hover\n\nBelow is an example of go-to-definition support\n\n![Untitled\\_ Sep 3, 2023 6_52 AM](https://github.com/evmts/evmts-monorepo/assets/35039927/ac46caf3-32cc-4ec5-8b3b-5e1df3f7819a)\n\n## VSCode instructions\n\nSpecial steps are needed to get the LSP features working in VSCode. Most editors should work out the box but please open an issue if you run into trouble.\n\nTo use this plugin with Visual Studio Code, you should set your workspace's version of TypeScript, which will load plugins from your tsconfig.json file.\n\n1. Open a typescript file in your project in vscode\n2. Open command pallet \u003ccmd\u003e+p or \u003cctrl\u003e+p\n4. Select `\u003eTypescript: Select TypeScript Version` in command pallet\n5. Select `Use workspace version`\n\n![image](https://github.com/evmts/bun-starterkit/assets/35039927/8d358843-8eed-415d-bc3c-04522a463d15)\n![image](https://github.com/evmts/bun-starterkit/assets/35039927/0111bd24-689f-4f57-a495-ed7dc17f63ae)\n\nYou now should get all the EVMts LSP features such as natspec comments on hover and go-to-solidity-definition support\n\nFor more details see: [Using the workspace version of TypeScript](https://code.visualstudio.com/docs/typescript/typescript-compiling#_using-the-workspace-version-of-typescript).\n\n## ⭐ Github\n\nIf you like Evmts give it a ⭐ at the [Evmts monorepo](https://github.com/evmts/evmts-monorepo)\n\n## 🔗 See also\n\n- Check out [Next.js starterkit](https://github.com/orgs/evmts/repositories) for an example of Evmts wagmi and Next\n- Check out [Vite starterkit](https://github.com/evmts/evmts-monorepo/tree/main/examples/vite) for an example of Evmts wagmi and Vite\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevmts%2Fevmts-vm-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevmts%2Fevmts-vm-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevmts%2Fevmts-vm-example/lists"}