Questions tagged [interfaces]

The tag has no usage guidance.

17 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
39 views

Nested usage of interfaces?

Using solidity ^4.x, it seems I can use an interface as a parameter type in a function from a different interface. Example: interface IERC20 { function transfer() external; } import "./IERC20....
2
votes
0answers
248 views

Can I extend the interface of a contract without redeploying it?

The case I'm dealing with is a contract which should serve as a Data Abstraction Layer. So ideally, it should provide only getter functions and setter functions. For example, my interface is: ...
1
vote
0answers
26 views

ERC-2222 : Funds Distribution Token implementation for a fee contract

My MainCore contract is a contract who sell NFT, and all the sell and buy have a 1% fee for team developper (uint DevelopperCutTotalSupply). I try to implement the ERC-2222 "Funds Distribution ...
1
vote
1answer
43 views

How to deploy smart contract so that average user can interact with its public functions?

I sucesfully wrote and deployed smart contract using Remix and Metask to generate hashes used as keys. This contract has few payable public functions that set or get some numbers. After deploying ...
1
vote
1answer
310 views

creating and array using type Big.Int and counting the sum of all integers inside it

Im communicating with a smart contract trying to get the balances from a list of addresses. I then want to get the sum of all balances but I am stuck on actually creating the array to store all the ...
1
vote
0answers
52 views

Enum type in interface function declaration

I understand that you "cannot define enums" in an interface contract; but, in the contract that I am working with, some of the function declarations require an enum type as an input or output ...
1
vote
0answers
52 views

What's so special about the .call() function?

All that the docs have to say about it is that it "lets the Ethereum network know we're not intending to persist any changes." So I get that it's used when not conducting a transaction. So, I decided ...
1
vote
0answers
256 views

ipcapi parameter usage

I initialize a node on my private test net passing only the eth interface in the ipcapi parameter expecting that I won't have access in the other interfaces such as admin etc.. However, when I attach ...
0
votes
1answer
60 views

Reflect Base contract's update in another contract

I have wanted to know what concept is it called when we want two contracts which are deployed on the Network, reflect the transaction and updates in another contract. for example: contract Base{ ...
0
votes
0answers
16 views

How to use web3 when one smart contract is interfacing with another?

A few months back I posted this question on this form. Since then, I've used the interface method to make my smart contracts interact together. I didn't have any problem while testing and developing ...
0
votes
0answers
30 views

how to pass fix size array via interface in solidity 0.4.25

I used the following code interface test{ function testfunction(uint[20] memory P, uint[20] memory Q) external returns(uint,bool,uint); } It gives the error Location has to be calldata for external ...
0
votes
0answers
105 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
36 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
45 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
56 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
0answers
77 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
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....