I'm trying to write a simple function retrieving the contract address with a simple call. Anyway while the address value is correct in the function scope, the return value calling the function in that way is giving me an undefined error.

You are using truffle i think, but you are not catching any errors form the RevenueShare.deployed() call. if instance.address is undefined then there is a problem in the contract deployment. try to log instance.address and see what it gives.
– Kaki Master Of TimeApr 5 '18 at 15:03

Yes I Am using truffle. Well actually instance.address is working, the console log inside the function gives out the right result (The contract address). Meanwhile when I try to call the function (as example in the first console.log) it returns an undefined.
– Stefano AngieriApr 5 '18 at 15:22

I it is just a javascript problem. promise returns are asyncronous so if you call your function, the result would be returned late and thus not shown.
– Kaki Master Of TimeApr 5 '18 at 15:27