Delegator

View Source: @nomisma/elektro-protocol-aux/contracts/delegate/Delegator.sol

↘ Derived Contracts: ElektroEventEmitterRouter, ElektroRegistryAdmin, ElektroRegistryRouter, FundLockRouter, FundLockStorage, TokenManagerAdmin

Delegator

Contract contains extracted common logic for call delegation. Contracts that are delegating calls are extending Delegator contract

Functions

  • delegate(address calleeContract, bytes parameters, string errorMsg)

delegate

Delegates call to specified contract. If delegatecall fails, transaction is reverted Additional check is done to verify that contract to call exists

function delegate(address calleeContract, bytes parameters, string errorMsg) internal nonpayable
returns(bytes)

Returns

result of delegatecall as bytes array. Those bytes can be used in contract that is delegating call

Arguments

NameTypeDescription

calleeContract

address

address of contract to delegate call to

parameters

bytes

function signature and parameters encoded to bytes

errorMsg

string

error message to revert in case of failed delegatecall execution

Last updated