1

I was digging into this OZ smart contract:

https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Context.sol

As you may see, it has only two functions to deal with metatxs. I can't figure out why this contract is defined as abstract, as both functions are implemented. Thanks in advance to all of you!

1 Answer 1

2

You can't create an instance of an abstract contract (with something like Context a = new Context();). So it's probably defined as abstract so it can't be deployed on its own - it has to be inherited. Deploying just the Context contract wouldn't make much sense anyway.

Wherever it's in use, it's part of an inheritance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.