Skip to content
Back to skills

Tevm Contract Deployment

ASecurity

Deploy contracts using ethers ContractFactory with Tevm. Use when deploying contracts in tests or local development.

  • 9 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 10, 2026
developmenttypescript

Works with

  • cli

Security analysis

A100/100

Scanned September 10, 2026

npx -y skills add cyotee/indexedex --skill tevm-contract-deployment --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tevm Contract Deployment?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tevm Contract Deployment
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cyotee-tevm-contract-deployment/badge)](https://www.skillsdirectory.com/skills/cyotee-tevm-contract-deployment)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tevm-contract-deployment
description: Deploy contracts using ethers ContractFactory with Tevm. Use when deploying contracts in tests or local development.
---

# Contract Deployment with Tevm

## Using Ethers ContractFactory

```typescript
import { ContractFactory } from 'ethers'
import { Wallet } from 'ethers'
import { createMemoryClient } from 'tevm'
import { parseEther } from 'viem'

const client = createMemoryClient()

// Create signer
const signer = Wallet.createRandom().connect(
  new ethers.BrowserProvider(client)
)

// Fund the account
await client.setBalance({
  address: signer.address,
  value: parseEther('10')
})

// Create factory
const factory = new ContractFactory(abi, bytecode, signer)

// Deploy
const contract = await factory.deploy(...constructorArgs)

// Mine the deployment
await client.mine({ blocks: 1 })

// Get address
const address = await contract.getAddress()
console.log('Deployed to:', address)
```

## Using tevmDeploy Action

```typescript
import { tevmDeploy } from 'tevm/actions'

const result = await tevmDeploy(client, {
  abi,
  bytecode,
  args: [arg1, arg2],
  from: deployerAddress,
  gasLimit: 1000000n
})

console.log('Address:', result.address)
console.log('Gas used:', result.gasUsed)
```

## With Constructor Arguments

```typescript
// If constructor takes arguments, include in bytecode or pass as args
const contract = await factory.deploy(arg1, arg2)

// Or with tevmDeploy
const result = await tevmDeploy(client, {
  abi,
  bytecode: bytecodeWithConstructor,
  args: [arg1, arg2]
})
```

## Working with Events

```typescript
// Listen for deployment events
contract.on('Transfer', (from, to, amount, event) => {
  console.log('Transfer:', from, to, amount)
  console.log('Block:', event.blockNumber)
  console.log('Tx:', event.transactionHash)
})

// Query past events
const filter = contract.filters.Transfer()
const events = await contract.queryFilter(filter, -1000, 'latest')
```

## State Manipulation After Deployment

```typescript
// Set initial storage
await client.setAccount({
  address: contractAddress,
  state: {
    [slot0]: value0,
    [slot1]: value1
  }
})
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.