ScriptHandler
ScriptHandler: <
TAbi
,TFunctionName
>(params
) =>Promise
<ScriptResult
<TAbi
,TFunctionName
>>
Examples
const res = tevm.script({ deployedBytecode: '0x6080604...', abi: [...], function: 'run', args: ['hello world']})
Contract handlers provide a more ergonomic way to execute scripts
ipmort {MyScript} from './MyScript.s.sol'
const res = tevm.script( MyScript.read.run('hello world'))
Type Parameters
• TAbi extends Abi
| readonly unknown
[] = Abi
• TFunctionName extends ContractFunctionName
<TAbi
> = ContractFunctionName
<TAbi
>
Parameters
• params: ScriptParams
<TAbi
, TFunctionName
>
Returns
Promise
<ScriptResult
<TAbi
, TFunctionName
>>