Is it possible for Solidity to accept mappings as input parameter in a function? I've been trying to create a function with a second parameter mapping (string => string) aMapping,
pragma solidity ^0.4.6;
contract testInputArray {
// Events
event LogFunctionWithMappingAsInput(address from, address to, string message);
function sendMessage(address to, mapping (string => string) aMapping) {
LogFunctionWithMappingAsInput(msg.sender, to, aMapping["test1"]);
}
}
but compiler throws the following error:
Untitled:7:35: Error: Type is required to live outside storage.
According to Can I call mapping as arguments of function? the function must be internal or private to accept a wrapping struct, but I need the function be callable from outside the contract, directly by an Ethereum transaction.
Is there any way to pass a mapping (associative array or dictionary) as an input parameter in Solidity? Thx!
Refs.: