Questions tagged [interfaces]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
51 views

What is the use of a interface or function without implementation?

Take, for example, this code. The interface contains function without implementation, so how it's useful. pragma solidity ^0.5.0; interface Calculator { function getResult() external view returns(...
0
votes
2answers
39 views

What does it mean to declare an item of type contract?

Wasn't quite sure how to word the title, but in the following code: contract KittyInterface { ... } contract ZombieFeeding is ZombieFactory { KittyInterface kittyContract; } what is the ...
0
votes
3answers
192 views

REMIX:This contract does not implement all functions and thus cannot be created

What should I do? pragma solidity ^0.4.21; contract ScoreInterface { function hit() public; function score() public view returns (uint); } This contract does not implement all ...
0
votes
2answers
182 views

Solidity how to check if user is already used another contract?

I am trying to figure out how to set up a simple communication between contracts. For example, we have a contract Passport, in which the user writes his data. After that, through the Election ...
0
votes
1answer
126 views

Enum in interfaces

Following the documentation I try to add a enum to my interface. Inside the interface I have a method called get that returns one of the enum value. Im trying to add the enum to the interface, because ...
0
votes
1answer
88 views

Interfaces implementation visibility

I have this interface: pragma solidity ^0.4.24; interface EventsInterface { function removeValueFromArray(uint _userId, uint[] array) external returns(uint[]); } And this contract: pragma ...
0
votes
1answer
110 views

Interface overriding

I have two contracts. One of them inherits another. Inside the parent contract I have the interface interface Token { function transfer(address to, uint256 value) external returns (bool); } I ...
0
votes
1answer
85 views

Error in external function parameter defination for an interface

Dear community members, I have come across an error while defining an interface (just using the standard one interface ERC721TokenReceiver) this interface is mentioned in this link https://github....
0
votes
1answer
68 views

Contract Using An Interface Is Not Compiling

I am learning Solidity and I am using Remix to experiment and enhance my learning. I am currently trying to create a simple contract that uses an Interface. pragma solidity ^0.4.19; contract ...
0
votes
1answer
130 views

Identical contract functions in interface with different inputs

In the ERC721 interface, you have two functions with the same name: function transferFrom(address _from, address _to, uint256 _tokenId) public; function transferFrom(address _from, address _to, ...
0
votes
0answers
17 views

Wrapping functions in interfaces to enable higher order function capability in Solidity?

Let's say I want to have higher order function capabilities in my Solidity Dapp. Also I want to be able to pass in new functions as input to higher order functions contained within contracts that were ...
0
votes
1answer
21 views

Like an ERC20 interface, do we have any interface or a smart contract that supports creating and transferring Ether on Ethereum?

To create a token on Ethereum, we use ERC20 token interface to design our token smart contract that captures functions required like mint(), tranfer(), balanceOf(), etc. Similarly, do we have any ...
0
votes
0answers
16 views

is there any possibility to read struct via interface from deployed contract?

the contract is deployed which has no view function for that particular struct, is there any way to read values via interface in another contract which I want to write and deploy ?
0
votes
1answer
50 views

DAPP WALLET transaction always fails

To improve my skills in solidity I'm working on a "wallet dapp". Based on smart contracts only, users can send ERC20 to another wallet. It works like that: user gives the following parameters: ...
0
votes
1answer
91 views

how to parse values returned by one contract into another?

I've two contracts deployed one is UserRegistration and another is Exam I've getUser(uint id) method to fetch data of particular user using users mapping, function getUser(uint _id) public constant ...
0
votes
0answers
73 views

Why is not Metamask invoked in my user interface?

I'm running a private Ethereum blockchain on my computer. I've installed Metamask on my chrome as well. I can create an account on metamask, and then interact with my smart contract deployed on my ...
0
votes
1answer
154 views

Should Solidity interfaces always specify return types?

I've seen interfaces in which the function definitions specify a return type, ie: (from openZepplin's IERC721.sol) function balanceOf(address owner) public view returns (uint256 balance); and ...
0
votes
0answers
14 views

what do I do with compiled interface output?

I created a token sale smart contract. And it has an interface that resolves to a token contract address. Now the output folder has the compiled token sale smart json file and the interface json file....

1
2