1.1.0-next.57 • Published 6 days ago

@tevm/actions v1.1.0-next.57

Weekly downloads
-
License
MIT
Repository
github
Last release
6 days ago

@tevm/actions

Ethereumjs implementation of the @tevm/actions-types

Actions add functionality to the base client

Installation

Action handlers can be imported from tevm/actions or @tevm/actions

npm install tevm

or

npm install @tevm/actions

Usage

Action handlers take a client and return an tevm action handler function

import {createBaseClient} from 'tevm/base-client'
import {callHandler} from 'tevm/actions'

/**
 * Most action handlers wrap the base client
 */
const client = createBaseClient()

/**
 * To use the action first instanciate it with the base client
 * @type {import('tevm/actions-types').CallHandler}
 */
const call = callHandler(client)

/**
 * @type{import('tevm/actions-types').CallHandlerResult}
 */
const callResult = await call({
  to: `0x${'01'.repeat(20)}`,
  value: 1n,
})

Actions

See generated actions docs

License 📄