@1hive/connect-core
Version:
Access and interact with Aragon Organizations and their apps.
26 lines • 1.14 kB
TypeScript
import { Provider } from '@ethersproject/providers';
export declare const FORWARD_SIG = "0xd948d468";
/**
* Tells if the given calldata (as a bytes string) is a valid invocation of
* `forward(bytes)`.
*
* It will return true only if the given calldata starts with the forward
* function signature and follows with at least an empty bytes array properly
* ABI encoded following the convention [offset][length][data].
*
* @param {string} calldata Calldata encoded as an array of bytes
*/
export declare function isValidForwardCall(calldata: string): boolean;
/**
* Parse the evmscript of a forward call following the byte ABI encoding
* convention [offset][length][data].
*
* @param {string} calldata Calldata encoded as an array of bytes
* @returns {string} Array of bytes representing the forwarded evmscript
*/
export declare function parseForwardCall(calldata: string): string;
/**
* Whether the `sender` can use the `forwarder` to invoke `script`.
*/
export declare function canForward(forwarderAddress: string, sender: string, script: string, provider: Provider): Promise<boolean>;
//# sourceMappingURL=forwarding.d.ts.map