1.0.0-next.125 • Published 8 months ago

tevm v1.0.0-next.125

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

CI

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.

  1. 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, "!"));
    }
}
  1. 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);
  1. 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 📄

1.0.0-next.125

8 months ago

1.0.0-next.124

8 months ago

1.0.0-next.120

9 months ago

1.0.0-next.121

9 months ago

1.0.0-next.122

8 months ago

1.0.0-next.123

8 months ago

1.0.0-next.113

9 months ago

1.0.0-next.114

9 months ago

1.0.0-next.115

9 months ago

1.0.0-next.116

9 months ago

1.0.0-next.117

9 months ago

1.0.0-next.118

9 months ago

1.0.0-next.119

9 months ago

1.0.0-next.110

10 months ago

1.0.0-next.111

9 months ago

1.0.0-next.112

9 months ago

1.0.0-next.108

10 months ago

1.0.0-next.109

10 months ago

1.1.0-next.88

12 months ago

1.1.0-next.89

12 months ago

1.1.0-next.93

11 months ago

1.1.0-next.94

11 months ago

1.1.0-next.91

11 months ago

1.1.0-next.92

11 months ago

1.1.0-next.90

11 months ago

1.1.0-next.57

1 year ago

1.1.0-next.58

1 year ago

1.1.0-next.56

1 year ago

1.1.0-next.97

11 months ago

1.1.0-next.98

11 months ago

1.1.0-next.95

11 months ago

1.1.0-next.96

11 months ago

2.0.0-next.106

10 months ago

2.0.0-next.84

12 months ago

2.0.0-next.105

10 months ago

2.0.0-next.85

12 months ago

1.1.0-next.100

11 months ago

2.0.0-next.86

12 months ago

2.0.0-next.103

11 months ago

2.0.0-next.87

12 months ago

1.1.0-next.59

1 year ago

2.0.0-next.107

10 months ago

2.0.0-next.102

11 months ago

2.0.0-next.101

11 months ago

1.1.0-next.60

1 year ago

1.1.0-next.61

1 year ago

1.1.0-next.68

1 year ago

1.1.0-next.69

1 year ago

1.1.0-next.66

1 year ago

1.1.0-next.67

1 year ago

1.1.0-next.64

1 year ago

1.1.0-next.65

1 year ago

1.1.0-next.62

1 year ago

1.1.0-next.63

1 year ago

2.0.0-next.79

12 months ago

2.0.0-next.80

12 months ago

2.0.0-next.81

12 months ago

2.0.0-next.82

12 months ago

2.0.0-next.83

12 months ago

1.1.0-next.71

1 year ago

1.1.0-next.72

1 year ago

1.1.0-next.70

1 year ago

1.1.0-next.77

12 months ago

1.1.0-next.78

12 months ago

1.1.0-next.75

1 year ago

1.1.0-next.76

12 months ago

1.1.0-next.73

1 year ago

1.1.0-next.74

1 year ago

1.1.0-next.50

1 year ago

1.1.0-next.55

1 year ago

1.1.0-next.53

1 year ago

1.1.0-next.54

1 year ago

1.1.0-next.51

1 year ago

1.1.0-next.52

1 year ago

1.1.0-next.49

1 year ago

1.1.0-next.47

1 year ago

1.1.0-next.48

1 year ago

1.1.0-next.46

1 year ago

1.1.0-next.45

1 year ago

1.0.0-next.44

1 year ago

1.0.0-next.42

1 year ago

1.0.0-next.41

1 year ago

1.0.0-next.40

1 year ago

1.0.0-next.39

1 year ago

1.0.0-next.38

1 year ago

1.0.0-next.37

1 year ago

1.0.0-next.36

1 year ago

1.0.0-next.35

1 year ago

1.0.0-next.34

1 year ago

1.0.0-next.33

1 year ago

1.0.0-next.32

1 year ago

1.0.0-next.31

1 year ago

1.0.0-next.29

1 year ago

1.0.0-next.18

1 year ago

1.0.0-next.28

1 year ago

1.0.0-next.30

1 year ago

1.0.0-next.17

1 year ago

1.0.0-next.16

1 year ago

1.0.0-next.15

1 year ago

1.0.0-next.14

1 year ago

1.0.0-next.13

1 year ago