@tevm/cli
TypeScript icon, indicating that this package has built-in type declarations

0.0.0 • Public • Published

wagmi logo

Evmts bun example

✨ EVMts remix starterkit

EVMts now supports Remix now that Remix supports vite

Remix + EVMts. EVMts is an LSP and bundler used to import solidity contracts directly into your TypeScript code.

Untitled_ Sep 9, 2023 9_27 AM (1)

🤝 Getting Started

  1. Install Node Modules with bun, yarn, pnpm, or npm. To install bun run npm install bun --global
bun install
  1. Run dev server
bun run dev
  1. Navigate to localhost:5173

image

EVMts bundler configuration

EVMts works via a vite plugin. This includes:

  1. EVMts configuration which is in the tsconfig.json.

  2. Vite plugin configuration in the vite.config.ts

This enables bun to import solidity files. EVMts imports are simple JavaScript objects that have the ABI and then helper methods to generate arguments for contract calls and event filters.

EVMts LSP

EVMts LSP gives you language server functionality in your editor. In EVMts this includes many nice features

  • Natspec comments on hover
  • go-to-definition takes you directly to the solidity code that defined the contract method or event
  • Etherscan links to your contracts on hover

Below is an example of go-to-definition support

Untitled_ Sep 3, 2023 6_52 AM

Ethers.js

EVMts works great with Ethers.js too. here is a simple example with ethers

image

VSCode instructions

Special 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.

To 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.

  1. Open a typescript file in your project in vscode
  2. Open command pallet +p or +p
  3. Select >Typescript: Select TypeScript Version in command pallet
  4. Select Use workspace version

image image

You now should get all the EVMts LSP features such as natspec comments on hover and go-to-solidity-definition support

For more details see: Using the workspace version of TypeScript.

⭐ Github

If you like Evmts give it a ⭐ at the Evmts monorepo

🔗 See also

Readme

Keywords

none

Package Sidebar

Install

npm i @tevm/cli

Weekly Downloads

104

Version

0.0.0

License

MIT

Unpacked Size

117 kB

Total Files

77

Last publish

Collaborators

  • fucory