is there any way to return an contract object like this ?
nothing, memory and storage dosent work here

Nov 30, 2021, 12:18 AM
You can return the address. Casting back to object is easy.
Nov 30, 2021, 12:31 AM
but how do I get the address if the created object?
Nov 30, 2021, 12:33 AM
https://stackoverflow.com/a/42416934
Nov 30, 2021, 12:36 AM
Oh thank you, that's realy useful. The only problem is, I need information from inside the contract at an other part of the contract.
Can I call the Funktion of an contract Form inside an other contract, if I have just the address and know the type of contract?

They usually explain how to reach it on the Java script level but not on Solidity level 😅
Nov 30, 2021, 12:46 AM
You can cast the addresss back into contract object

https://ethereum.stackexchange.com/a/39409
Nov 30, 2021, 12:53 AM
I think that dosent work anymore, i cant use:
function createObject(string name) returns (address objectAddress) {
return address(new Object(name));
}

also the memory is not added yet - but i still dont know how to creat objects that get data handed to for the constructor during run time
Nov 30, 2021, 10:30 PM

© 2024 Draquery.com All rights reserved.