Type type(contract AggregatorV3Interface) is not implicitly convertible to expected type contract AggregatorV3Interface
TypeError: Type type(contract AggregatorV3Interface) is not implicitly convertible to expected type contract AggregatorV3Interface. –> contracts/FundMe.sol:21:10: | 21 | AggregatorV3Interface priceFeed = AggregatorV3Interface; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Here’s my code: function getVersion() internal view returns (uint256) { AggregatorV3Interface priceFeed = AggregatorV3Interface; return priceFeed.version(); } i dont know i still cant figure that out solidity 1 An interface type […]
why findIndex can not get correct result
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; library ArrayLib { function find(uint[] storage arr, uint num) internal view returns (uint) { for(uint i =0; i< arr.length; i++) { if(arr[i] == num) { return i; } } revert(“not found”); } } contract TestArray { uint[] public arr = [1,2,3,4]; function findIndex(uint num) external view returns (uint) { […]
why findIndex can not get correct result
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; library ArrayLib { function find(uint[] storage arr, uint num) internal view returns (uint) { for(uint i =0; i< arr.length; i++) { if(arr[i] == num) { return i; } } revert(“not found”); } } contract TestArray { uint[] public arr = [1,2,3,4]; function findIndex(uint num) external view returns (uint) { […]
why findIndex can not get correct result
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; library ArrayLib { function find(uint[] storage arr, uint num) internal view returns (uint) { for(uint i =0; i< arr.length; i++) { if(arr[i] == num) { return i; } } revert(“not found”); } } contract TestArray { uint[] public arr = [1,2,3,4]; function findIndex(uint num) external view returns (uint) { […]
why findIndex can not get correct result
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; library ArrayLib { function find(uint[] storage arr, uint num) internal view returns (uint) { for(uint i =0; i< arr.length; i++) { if(arr[i] == num) { return i; } } revert(“not found”); } } contract TestArray { uint[] public arr = [1,2,3,4]; function findIndex(uint num) external view returns (uint) { […]
why findIndex can not get correct result
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; library ArrayLib { function find(uint[] storage arr, uint num) internal view returns (uint) { for(uint i =0; i< arr.length; i++) { if(arr[i] == num) { return i; } } revert(“not found”); } } contract TestArray { uint[] public arr = [1,2,3,4]; function findIndex(uint num) external view returns (uint) { […]
why findIndex can not get correct result
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; library ArrayLib { function find(uint[] storage arr, uint num) internal view returns (uint) { for(uint i =0; i< arr.length; i++) { if(arr[i] == num) { return i; } } revert(“not found”); } } contract TestArray { uint[] public arr = [1,2,3,4]; function findIndex(uint num) external view returns (uint) { […]
Solidity ERC721, how to correctly extends several base contracts
I’m very new to solidity programming, and I’m following an old tutorial based on 0.5.0.
I’m working on this project in Remix to practice with Sepolia and can’t seem to get past this issue to compile?
TypeError: Member “safeApprove” not found or not visible after argument-dependent lookup in contract IERC20.
–> contracts/MyBot808.sol:37:13:
|
37 | IERC20(assets[i]).safeApprove(address(LENDING_POOL), amountOwing);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Data location must be “memory” or “calldata” (but function is public)
If possible please some help !
I create a contract in Solidity. Because its size is too big i try a way to move some functions to a second contract to free some space.So i have this :
The main contract