Execute solidity scripts in browser 🏗️🚧
🏗️🚧 EVMts is a work in progress
EVMts enables direct evm execution clientside with forge cheat codes and direct solidity file imports.
Visit Docs for docs, guides, API and more! 📄
See EVMts Beta project board for progress on the upcoming beta release! 💥
- @evmts/core core evmts library
- @evmts/rollup-plugin rollup/vite plugin enabling solidity imports in Typescript files
- @evmts/ts-plugin
@evmts/playground contains an example vite app for developing on evmts @evmts/e2e contains e2e tests that run against all example apps @evmts/docs contains the docs astro app
See docs/evmts for installation and and more detailed usage documentation.
See docs/monorepo for documentation on how to execute the monorepo with nx
See docs/contributing for documentation on how to contribute to evmts. No contribution is too small
Scripts in EVMts work exactly like the scripts in forge
pragma solidity ^0.8.17;
import {Script} from "forge-std/Script.sol";
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract Example is Script {
function run(ERC20 erc20Contract, address recipient, uint256 amount) external {
address signer = vm.envAddress("SIGNER");
vm.startBroadcast(signer);
contract.transferFrom(signer, recipient, amount);
vm.stopBroadcast();
}
}
- no code gen step
- no abis
- no boilerplate
Just import your script and run it.
import { Example } from "./Example.s.sol"; // [!code focus]
import { evmts } from "./evmts";
import { Address } from "@evmts/core";
const tokenAddress: Address = "0x4200000000000000000000000000000000000042";
const recipient: Address = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045";
const amount = BigInt(420);
evmts // [!code focus]
.script(Example) // [!code focus]
.run(tokenAddress, receipeint, amount) // [!code focus]
.broadcast()
.then(({ txHash }) => {
console.log(txHash);
});
You don't need to install anything just to play with EVMts! Try editing this sandbox or check out the getting started docs
- Will Cory (@fucory)
If you believe you have found a security vulnerability we encourage you to responsibly disclose this and not open a public issue. We will investigate all legitimate reports. Email will@oplabs.co
to disclose any security vulnerabilities.
Please see our contributing.md.
This project is work in progress and subject to frequent changes
Looking to get started building a production-ready dapp? Check out viem
Interested in the OP stack? Check out op stack blog here: https://optimism.mirror.xyz/fLk5UGjZDiXFuvQh6R_HscMQuuY9ABYNF7PI76-qJYs
Enjoy this tool? Check out these other awesome tools Foundry, viem, abitype, ethereumjs-monorepo, wagmi, Verifiable rpc, Optimism (I work here), helios