New answers tagged

0

From 0.5 the syntax for .call has changed. It accepts a single bytes memory parameter and returns a tuple (bool, bytes memory). That should be written as (bool success, bytes memory data) = _spender.call(abi.encodeWithSignature("receiveApproval(address,uint256,address,bytes)", msg.sender, _value, address(this), ...


1

An easy solution for inheriting from IFlashLoanReceiver is to create an internal function that is callable from the executeOperation. // SPDX-License-Identifier: ISC pragma solidity 0.6.12; // Interface cannot be modified interface IFlashLoadReceiver { function executeOperation( address[] calldata assets, uint256[] calldata amounts, ...


Top 50 recent answers are included