Hello, I'm studying and trying to understand what that Base is (line 24), is it a specified kind of variable type? If so, does anyone know where it is explained in documentation?
Oct 12, 2021, 12:30 AM
I know it is the same name as the contract created but I didn't understand how it was used there
Oct 12, 2021, 12:31 AM
It’s a public viewable function. So they are defining it
Oct 12, 2021, 12:31 AM
You define what base is at lines 3->19
Oct 12, 2021, 12:32 AM
I'm sorry, I didn't get it, I know that in lines 3-19 it is creating a contract called Base, but I didn't understand why it is being called just like it was a variable type at line 24 and also like it as a function (Base())
is Base a function? I thought it was a contract created in lines 3-19
Oct 12, 2021, 12:34 AM
Are you familiar with object oriented paradigm?
Oct 12, 2021, 12:34 AM
I think yes, but now I'm not sure, I had some concepts when studying Javascript, although I know that isn't pure OOP
Oct 12, 2021, 12:35 AM
Well you can think of contract as a class and at line 24 you are instantiating an object
Oct 12, 2021, 12:37 AM
Is that so creating a kind of new instance of Base contract?
if so, what Base(baseAddress) does?
Oct 12, 2021, 12:38 AM
It retrieves the instance of class Base that is at address baseAddress
Oct 12, 2021, 12:41 AM
If not, a command to isolate the startup
Oct 12, 2021, 1:17 AM
thank you, did you know if it is explained in details in documentation? I didn't find it there
Oct 12, 2021, 1:25 AM