Skip to main content

Function: selfCallWrapper()

function selfCallWrapper(handler): MethodCallback;

Wraps a method callback to ensure that it can only be called by the contract itself.

Parameters

handler: MethodCallback

The method callback to wrap.

Returns

MethodCallback

A new method callback that throws an error if the call is not from the contract itself.


Coinweb © 2024