Questions tagged [abstract]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5
votes
1answer
5k views

Deploying abstract contracts and interfaces

I am trying to create a basic inheritance hierarchy with abstract/virtual formalisms. Consider the following two contracts: Abstract Contract (IUser.sol): contract IUser { function addUser (...
2
votes
1answer
512 views

abstract contract getting deployed instead of the main contract on truffle migrate

I'm building a project which consists of two .sol files -> A.sol and B.sol. Now, A.sol contains an abstract contract definition of B, among other things, like this: Contract B { function fnB() ...
2
votes
1answer
113 views

possible to implement abstract base function with property in derived contract?

Is there any way to have an abstract base contract with an abstract function which gets implemented in a derived contract by a property (and not a function)? e.g. the following attempts failed: ...
1
vote
1answer
526 views

Error: This contract may be abstract

My solidity contract compiles in Remix, but when I try to deploy it it fails and throws Error: This contract may be abstract, not implement an abstract parent's methods completely or not invoke an ...
1
vote
4answers
65 views

Issue deploying this contract

This is a contract im trying to deploy and i think its an abstract contract as most of the functions dont seem to be implemented... anyway the issue im facing is that truffle is telling me i cant ...
1
vote
1answer
655 views

What are the benefits of abstract contracts?

I've seen similar questions, but none answer why people use abstract contracts. I come from a non-OOP JavaScript background, so I have some trouble understanding these things. From the docs: pragma ...
1
vote
1answer
311 views

Abstract delegate call

So there is a way to call other contract using abstract prototype of that contract. But what about delegate calls? I need to split my huge contract into separate pieces. So i can call my functions ...
0
votes
1answer
45 views

Abstract contracts cannot be initialised, can they?

As of v0.6, solidity introduced abstract contracts. Do they behave just like in all other languages - that is, they can't be initialised, can they?
0
votes
1answer
138 views

How to deploy a contract and its abstract/interface?

Assume I have a contract A: pragma solidity ^0.4.4; contract A{ struct St{ uint val; } function double(uint a)external returns (uint res){ res= 2*a; } } Let's call the above lines of ...
0
votes
1answer
982 views

What are abstract contracts?

I found the following case below in a book. case 1: contract sample1{ function a() returns (int b); } contract sample2{ function myFunc() { sample1 s = sample1(...
0
votes
1answer
132 views

This contract may be abstract, not implement an abstract parent's methods completely or not invoke an inherited contract's constructor correctly

I'm trying to test out Ampleforth on Rinkbey using Remix. Here are all the files that I copy into remix. https://github.com/cryptoghoulz/based-contracts/tree/master/contracts/v4 They compile fine, but ...