Hi @cryptokid,
I have one issue using morails.
I need to get the result(address) after run write function with return value(address) on react.
Here is my code:
on Contract,
function createNewCollection(…) external returns (address) {
address newContract = …;
…
return newContract;
}
on react,
let ops = {
contractAddress: marketAddress,
functionName: “createNewCollection”,
abi: contractABI,
params: {
collectionType: collectionType,
_name: title,
_symbol: symbol,
_uri: metadataUrl
}
};
await contractProcessor.fetch({
params: ops,
onSuccess: async (result) => {
let collectionAddr = await result.wait();
console.log(“new collection address:”, collectionAddr);
}
}
But, collectionAddr is still transction, not address.
How can I fix this problem?
I hope your quick help.
Regards,