You are such an important ressource for all the blockchain industry ! no kidding, the way you explain solidity is so CLEAR ! Thank you El. Professor
@zes72152 жыл бұрын
no such thing as imx or callx or parentx or inherix or genx or etc, ts just macx, nonerx, ceuxyuax, do, be, say, can do, be, say any nmw and any s perfx
@lkd9822 жыл бұрын
These tutorials are a marvel of methodical consistency
@orleee2 жыл бұрын
thank you for explaining this in a simple and to the point way ,
@gosuto-inzasheru2 жыл бұрын
aaaand another perfect explanation!
@FCXPERT102 жыл бұрын
👍..keep making tutorials on solidity ..it helps the community to grow
@romanrogers16472 жыл бұрын
Thanks for this! When calling super.bar() inside contract H, why is it calling contract G instead of contract F? Is this because G's functionality is the highest function on the stack and is therefore called first, and then we skip H's call because it's noted as a duplicate?
@Bruhne Жыл бұрын
Got it!
@abithshaji7862 Жыл бұрын
You have used event here. Does it not work if we have a return statement? I mean for a function that returns something.
@Ts2pc2 жыл бұрын
May I ask why ? after calling the function bar, I thought there will be two e.bar , but only e.bar is logged? Thanks in advance!
@thanhvuong33859 ай бұрын
I also think like this, have you find out the reason?
@thanhvuong33859 ай бұрын
@@Ts2pc man it's 1 year ago, do you working in this blockchain field?
@ViktorNaychevАй бұрын
The super keyword in Solidity refers to the next parent in the inheritance chain, not necessarily the immediate parent. In this context, Solidity uses a C3 Linearization algorithm to determine the order in which parent contracts are called. C3 linearization ensures that each parent contract in the inheritance tree is called exactly once, even if there are multiple paths to that parent. - explanation generated from GPT-4o
@MrCoreyTexas5 ай бұрын
I don't think you should create such complicated multiple inheritance graphs. For one thing, I was surprised to learn that calling bar() on H called G.bar() and then F.bar(); from the way things have worked until now, it would seem it would do F.bar() then G.bar(), in other words, left to right. I consider this a design error in solidity! I would also have expected E.bar() to be called twice, not once - because both F.bar() and G.bar() call the function with super. More proof that multiple inheritance can get really complex and hard to reason about. Imagine an even more complex inheritance graph and trying to figure out the order of things.
@smartcontractprogrammer5 ай бұрын
Yes, you shouldn't create a complicated inheritance in your code. This was an example to illustrate how inheritance behaves in Solidity
@ViktorNaychevАй бұрын
The super keyword in Solidity refers to the next parent in the inheritance chain, not necessarily the immediate parent. In this context, Solidity uses a C3 Linearization algorithm to determine the order in which parent contracts are called. C3 linearization ensures that each parent contract in the inheritance tree is called exactly once, even if there are multiple paths to that parent. - explanation generated from GPT-4o
@jhaymes82202 жыл бұрын
Is there a way I I can inherit a contract and only to only use one of its functions?
@smartcontractprogrammer2 жыл бұрын
Parent.func() ?
@thanhvuong33859 ай бұрын
@@smartcontractprogrammer I think he mean that the child contract only be able to call 1 func from parent contract. So in parent contract we can set others function as private right?