0

Is something like this a good idea? I want to concatenate two values but it doesn't work.

function charityWallets() public view returns (address) {
    return _charityWalletAddress + " - " + _charityWalletAddress2;
}
1

Try this

function charityWallets() public view returns (address, address) {
    return (_charityWalletAddress, _charityWalletAddress2);
}

On the receiving side, you need to handle two values. Something like this:

(address a, address b) = charityWallets();

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.