UNPKG

@1hive/connect-core

Version:

Access and interact with Aragon Organizations and their apps.

21 lines 1.02 kB
import { calculateTransactionPath } from './calculatePath'; import ForwardingPath from '../../entities/ForwardingPath'; /** * Calculate the transaction path for a transaction to `destination` * that invokes `methodSignature` with `params`. * * @param {string} destination * @param {string} methodSignature * @param {Array<*>} params * @param {string} [finalForwarder] Address of the final forwarder that can perfom the action * @return {Promise<Array<Object>>} An array of Ethereum transactions that describe each step in the path */ export async function getForwardingPath(sender, destinationApp, methodSignature, params, installedApps, provider, finalForwarder) { const { path, transactions } = await calculateTransactionPath(sender, destinationApp, methodSignature, params, installedApps, provider, finalForwarder); return new ForwardingPath({ destination: destinationApp, path, transactions, }, installedApps, provider); } //# sourceMappingURL=getForwardingPath.js.map