tevm v1.0.0-next.125
tevm-monorepo
Tevm is an ethereum development toolkit that offers
- Arbitrary EVM execution and forking akin to [anvil](https://github.com/foundry-rs/foundry/tree/master/crates/anvil)
- A powerful solidity scripting environment akin to [foundry scripts](https://book.getfoundry.sh/tutorials/solidity-scripting)
- Build tooling to create a smooth interface between your Solidity scripts and TypeScript code
Tevm runs in all environments
- [All modern browsers](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#browser_compatibility)
- [Node.js >=18](https://nodejs.org/en)
- [Bun](https://bun.sh)
Try it out
Try out our [online frontend example on stackblitz](https://stackblitz.com/~/github.com/evmts/tevm-vite-wagmi-example)
Visit [Docs](https://tevm.sh/) for docs, guides, API and more! 📄
Code example
Tevm scripting is a simple yet powerful way to program.
- Write a solidity script
HelloWorld.s.sol
// SPDX-License-Identifier: MIT
pragma solidity >0.8.0;
contract HelloWorld {
function greet(string memory name) public pure returns (string memory) {
return string(abi.encodePacked("Hello ", name, "!"));
}
}
- Import the solidity file into a JavaScript or TypeScript file. No need to compile it.
import { HelloWorld } from "./HelloWorld.sol";
console.log(HelloWorld.abi);
console.log(HelloWorld.bytecode);
- Initialize a [Tevm memory client](./packages/memory-client/docs/functions/createMemoryClient.md) and execute your Script using the [
tevm.script
](./packages/actions/docs/type-aliases/ScriptHandler.md) action
import { HelloWorld } from "./HelloWorld.sol";
import { createMemoryClient } from "tevm";
const client = createMemoryClient();
const result = await tevm.script(HelloWorld.read.greate("World"));
console.log(result.data); // Hello world!
This is just a small subset of what Tevm offers. See [docs](https://tevm.sh/) for more information.
Contributing 💻
Contributions are encouraged, but please open an issue before doing any major changes to make sure your change will be accepted.
See [CONTRIBUTING.md](../CONTRIBUTING.md) for contributing information
License 📄
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
1 year ago
1 year ago
12 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
12 months ago
12 months ago
12 months ago
12 months ago
11 months ago
1 year ago
11 months ago
1 year ago
12 months ago
1 year ago
11 months ago
1 year ago
1 year ago
11 months ago
11 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago