Ethereumjs implementation of the @tevm/actions-types
Actions add functionality to the base client
Action handlers can be imported from tevm/actions
or @tevm/actions
npm install tevm
or
npm install @tevm/actions
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,
})