This is my smart contract:
contract Bank {
mapping(bytes32 => State) internal states;
bytes32[] internal possibleStates;
struct State {
// a boolean to check if the state is actually created
bool hasBeenCreated;
// a mapping of functions that can be executed when in this state
mapping(bytes4 => bool) allowedFunctions;
// a list of all the roles that have been configured for this state
bytes32[] allowedRoles;
// a list of all the preconditions that have been configured for this state
function(bytes32, bytes32) internal view[] preConditions;
// a list of callbacks to execute before the state transition completes
function(bytes32, bytes32) internal[] callbacks;
// a list of states that can be transitioned to
bytes32[] nextStates;
// function that executes logic and then does a StateTransition
bytes4 preFunction;
}
function createState(bytes32 stateName) public {
states[stateName].hasBeenCreated = true;
}
}
But when I try to use the function createStake in Remix with the following values: "test" or "test, test" or ["test"] or ["test", "test"]
Nothing works I always have the following error message: Error encoding arguments: Error: invalid arrayify value (argument="value", value="test, test", code=INVALID_ARGUMENT, version=bytes/5.4.0)
Can someone explain me why? Thanks!