Hi, I’ve developed a new smart contract for testing purposes.
This is what I did:
contract LogoVote =
record state = {
urls : map(int, string)}
function init() = { urls = {} }
public function getLogo(index : int) : string =
state.urls[index]
public stateful function setLogo(index: int, url : string) =
put(state { urls[index] = url })
When I compile it, it’s ok. I deployed it ok also. But when trying to call function setLogo with this params 1,“www.google.com” I get this response:
{“data”:{“reason”:“Parse errors\nline 14, column 41: Unexpected token id”}}
Does anybody know where’s the error? Am I doing something wrong?
Thanks in advance!